Re: Getting user idle time - screenSaver?
Re: Getting user idle time - screenSaver?
- Subject: Re: Getting user idle time - screenSaver?
- From: David Remahl <email@hidden>
- Date: Tue, 13 Nov 2001 20:07:47 +0100
>
On mardi, novembre 13, 2001, at 03:08 , Adam Iser wrote:
>
>
> Hey everyone - quick question for ya :)
>
> I asked this question a while ago and no one knew of a "legal" way to
>
> get this information from the system... so I ask again now that 10.1 is
>
> out and about in hopes of an answer :)
>
>
>
>
>
> Is there a way to get user idle time?..
>
>
>
>
>
> Something simple I can call every minute or so to keep an accurate
>
> idle counter?
>
>
>
>
>
> If not... are there any private functions that do this? how is the
>
> screenSaver figuring this information out?
>
>
While playing with top in the Terminal:
>
>
0 idle_threa 85.4% 11:42.18
>
>
Maybe there's a computing that can be done to get what you need. Not
>
sure though.
No. idle_thread just shows the amount of CPU time not used. It is relative
to boot time, and just a percentage of uptime. (since, you presumably use
some of the processor most of the time...)
/ david