how to capture the system idle time

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
ravi_reddy_007
Posts: 3
Joined: Wed Jul 27, 2005 11:00 pm

how to capture the system idle time

Post by ravi_reddy_007 »

I want to capture the system idle time. Means if the user did not press any key or did not move the mouse then it is considered as system idle time. I want the code for this in C/C++ on windows operating system. Please help me.
Osbios
Member
Member
Posts: 116
Joined: Fri Jun 10, 2005 11:00 pm

Re: how to capture the system idle time

Post by Osbios »

Thats Win-API stuff. Use [url]msdn.microsoft.com[/url]
dw 0xAA55
User avatar
carbonBased
Member
Member
Posts: 382
Joined: Sat Nov 20, 2004 12:00 am
Location: Wellesley, Ontario, Canada
Contact:

Re: how to capture the system idle time

Post by carbonBased »

Make a thread, of the lowest priority. Count how long this thread is active. That's your system idle time.
Post Reply