MacOS idle time in gtkidle.c
stephen.more at gmail.com
Thu Jun 28 12:48:19 EDT 2007
I created a dynamic library on Mac OS X ( 10.3.9 ) that displays the idle time.
It is a subset of gtkidle.c
# ifdef HAVE_IOKIT
I will ssh into the Mac and execute this code, and it seems to respond
back with a cached version of idle time. I execute it over and over
again the the idle time does not change.
The command "ioreg -c IOHIDSystem" seems to refresh the cache.
I am not a Mac API expert...is there and API that can be called
instead of adding this hack ?
system( "ioreg -c IOHIDSystem > /dev/null" );
More information about the Devel