User Tools

Site Tools


getting_20the_20user_20idle_20time

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
getting_20the_20user_20idle_20time [2018/03/31 13:19] – external edit 127.0.0.1getting_20the_20user_20idle_20time [2024/01/05 00:22] (current) – external edit 127.0.0.1
Line 1: Line 1:
 =====Getting the User Idle time===== =====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:\\ +//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: 
 + 
 +<code bb4w>
         DIM lii{cbSize%, dwTime%}         DIM lii{cbSize%, dwTime%}
         lii.cbSize% = DIM(lii{})         lii.cbSize% = DIM(lii{})
Line 7: Line 9:
         SYS "GetTickCount" TO tick%         SYS "GetTickCount" TO tick%
         PRINT "User Idle time is "; (tick%-lii.dwTime%)/1000 " seconds"         PRINT "User Idle time is "; (tick%-lii.dwTime%)/1000 " seconds"
 +</code>
getting_20the_20user_20idle_20time.1522502363.txt.gz · Last modified: 2024/01/05 00:17 (external edit)