MacOS idle time in gtkidle.c

Stephen More stephen.more at
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
# else

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 there and API that can be called
instead of adding this hack ?
system( "ioreg -c IOHIDSystem > /dev/null" );

Steve More

More information about the Devel mailing list