getting_20the_20user_20idle_20time

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. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
getting_20the_20user_20idle_20time.txt · Last modified: 2024/01/05 00:22 by 127.0.0.1