🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.comp.lang.borland-delphi
2 messages
2 total messages Started by At Wed, 23 Apr 2003 10:34
Detecting computer is idle
#2383
Author: At
Date: Wed, 23 Apr 2003 10:34
8 lines
1537 bytes
Hi!

I want to detect that the computer is idle for a specified time. How can I
do this?


Best regards,
At
Re: Detecting computer is idle
#2386
Author: KLinZ
Date: Fri, 25 Apr 2003 22:09
20 lines
2155 bytes
At wrote:

> I want to detect that the computer is idle for a specified time. How
> can I do this?

Do you mean the idle time of the computer or the idle time of the user? For
the latter have a look at my TIdleDetector class.

http://www.zenobits.com/projects.php/1#TIdleDetector

It uses window message hooks to detect mouse and keypresses.

If you meant the idle time of the computer, have a look at winapi functions
like GetProcessTimes() etc. You must be able to use that function to
determine the process time of the 'Idle' process. If the CPU time is above a
given treshold (>=99%?), the computer is idle.


--
www.zenobits.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads