How to know the System idle time

How to find out the System idle time, means to calcuclate the time the user keeps the system idle (ie without moving the mouse and without touching the keyboard) and between which time the system is idle .
[212 byte] By [jayasreekalapalaa] at [2007-11-26 18:32:12]
# 1

If your application always has system focus, you can probably do this using a MouseMotionListener and KeyPressListener and a Timer object or similar.

If you want to be able to monitor 'outside' of your application then I'd guess some system-specific calls are required, in which case JNI is your friend....

iklestevea at 2007-7-9 6:06:18 > top of Java-index,Java Essentials,Java Programming...