109
TIMER
Purpose To return the number of seconds elapsed since the mobile computer
on.
Syntax A& = TIMER
Remarks “A&” is a long integer variable to be assigned to the result.
Note that the TIMER is a read-
only function. The system timer cannot be set by
this command.
Example
StartTime& = TIMER
…
Loop:
IF EndTime& <> TIMER THEN
EndTime& = TIMER
TimerElapsed& = EndTime& - StartTime&
CLS
PRINT TimerElapsed&
IF TimerElapsed& > 100 THEN GOTO NextStep
END IF
GOTO Loop
NextStep:
See Also OFF TIMER, ON TIMER GOSUB…
WAIT
Purpose
To put the system on hold for a specified duration. In the interval, the system
will be running in a rather low power consumption mode.
Syntax WAIT(duration%)
Remarks Note that WAIT is more efficient than CHANGE_SPEED.
“duration%”
is a positive integer variable, indicating the time duration for a
hold. This argument is specified in units of 5 milliseconds.
When the application is waiting for events in a loop, the power consumption
will be dramatically reduced by calling this function.
Example
PRINT “CipherLab BASIC”
‘ the system is on hold for 1 second