Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A script to measure idle time on input devices' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to measure idle time on input devices
Authored by: magir on Jan 01, '06 09:50:28AM
To let the script run endlessly simply surround the statement by "until":

#!/bin/sh
until false
do
  echo $((`ioreg -c IOHIDSystem | sed -e '/HIDIdleTime/ !{ d' -e 't' -e '}' -e 's/.* = //g' -e 'q'` / 1000000000))
  sleep 1
done
                                                                                                                        


[ Reply to This | # ]