.UTIL TIMEOUT SET
This subroutine sets the keyboard timeout value.
Usage:
PASS <seconds> FIELD SHARE? N
GOSUB --- .UTIL TIMEOUT SET
* Check for errors
IF --- .UTIL TIMEOUT SET NE
Description:
This subroutine sets the keyboard timeout value. The number of seconds must be PASSed or the subroutine will CANCEL.
<seconds> is the number of seconds before a timeout occurs (Required). This must be an integer greater than zero. Passing zero or a negative number will not start a timer.
The timer will count down unless the user presses a key or mouse clicks. When the user presses a key or clicks the mouse, the timer starts again. If the timer reaches zero, --- OPTION is set to TIMEOUT and the process resumes executing as if the user had pressed an option key. You can check for --- OPTION = TIMEOUT in the option intercept or global option intercept event points or use
.UTIL TIMEOUT EXIT.
This routine is normally called in the Start of Process event point, but you can use it anywhere to reset the timeout value. You can have multiple timers running at different process levels but only one timer is allowed at each processing level. For example, you could set a 30 minute timer at the menu, and a 5 minute timer in the inputs.
When the lower level timeout is activated, control is returned to the higher level timer, which is then reset just as if a key had been pressed.
Note: This timer could be used for many different things other than the one presented here. When the timer reaches zero, a TIMEOUT event is generated, but the timer is reset and continues on. It will continue to generate TIMEOUT events until the the timer is explicitly set to zero or the level is exited.
Also see
.UTIL TIMEOUT EXIT.
Comments:
Read what other users have said about this page or add your own comments.
--
JeanNeron - 2012-01-31