User Tools

Site Tools


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"
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information
getting_20the_20user_20idle_20time.1522502363.txt.gz · Last modified: 2018/03/31 13:19 by 127.0.0.1