How to detect system idle time? 
Author Message
 How to detect system idle time?

How does one go about determining how long it's been since the user used the
system?  At a given time, I need to be able to determine if the user has
used the computer in the last n minutes.

I know the app get a WM_SYSCOMMAND message with a SC_SCREENSAVE (sp?) so we
can do some sort of screen saver routine work, but this is not an approach I
can use.  My app has its own setting for the amount of time to wait.

Thanks in advance for any help.

Mike Dembroge



Sat, 03 Mar 2001 03:00:00 GMT  
 How to detect system idle time?
You can put a counter in CWinApp::OnIdle that counts the elapsed time.
use ::timeGetTime or a similar function, subtract off a member variable
start time, compare to a target, and GO! - Doug S.
Quote:

> How does one go about determining how long it's been since the user used the
> system?  At a given time, I need to be able to determine if the user has
> used the computer in the last n minutes.

> I know the app get a WM_SYSCOMMAND message with a SC_SCREENSAVE (sp?) so we
> can do some sort of screen saver routine work, but this is not an approach I
> can use.  My app has its own setting for the amount of time to wait.

> Thanks in advance for any help.

> Mike Dembroge



Sat, 03 Mar 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to get system idle time or get notified after the system being idle for an extended time

2. Detecting System Idle

3. Detecting computer Idle Time

4. How to get system idle time or get notified after the system being idle for an extended time

5. System Idle time

6. System Idle Time modification...

7. Getting idle time of system/os

8. system idle time

9. System Idle Time modification...

10. How to determine system idle time without hooks?

11. Monitoring System Idle Time

12. execute on system idle time

 

 
Powered by phpBB® Forum Software