|
Previous Top Next |
Prototype: | (),LONG |
Returns | Returns a Clarion Time (i.e. 1/100 seconds) that have elapsed since the last user input has occurred. |
This method can be used to easily monitor the time that the system has not been active, i.e. no user input registered. It uses the GetLastInputTime to get the millisecond number when the last user input occurred and compares it to the value of the LastActiveTick property. It then calculates the elapsed time by using the LastActiveTime which is reset any time the method is called an the ticker has changed. It would generally be appropriate to call this method from a timer event handler
Example:
ITW ITWindowsClass
Loc:IdleTime TIME !
W WINDOW('Check Idle Time on system'),AT(,,194,138),FONT('Segoe UI',10,,),TIMER(100),GRAY
STRING(@t04),AT(63,31),USE(Loc:IdleTime),TRN,RIGHT,FONT(,18,,FONT:bold)
BUTTON('Close'),AT(75,106,45,14),USE(?Close)
END
Code
Open(W)
Accept
Case EVENT()
Of EVENT:Timer
Loc:IdleTime = ITW.GetIdleTime()
Display
End
If Field() = ?Close And Event() = EVENT:Accpted
Break
End
End
Close(W)
See also:
LastActiveTime
LastActiveTick
GetLastInputTime