User Tools

Site Tools


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.txt · Last modified: 2018/04/15 11:36 by richardrussell