getting_20the_20user_20idle_20time
This is an old revision of the document!
Getting the User Idle time
by Richard Russell, October 2011
The User Idle time is the time since the user last interacted with the PC, for example by pressing a key or moving the mouse. It's useful for things like determining when to display a screensaver.
It's quite easy to get the User Idle time in BBC BASIC:
DIM lii{cbSize%, dwTime%} lii.cbSize% = DIM(lii{}) SYS "GetLastInputInfo", lii{} SYS "GetTickCount" TO tick% PRINT "User Idle time is "; (tick%-lii.dwTime%)/1000 " seconds"
getting_20the_20user_20idle_20time.1523788565.txt.gz · Last modified: 2024/01/05 00:17 (external edit)