Version: stable
FUNCTION | |
---|---|
timer.delay() | create a timer |
timer.cancel() | cancel a timer |
CONSTANT | |
---|---|
timer.INVALID_TIMER_HANDLE | Indicates an invalid timer handle |
timer.delay(delay,repeat,callback)
PARAMETERS
delay |
time interval in seconds |
repeat |
true = repeat timer until cancel, false = one-shot timer |
callback |
timer callback function
|
RETURNS
handle |
identifier for the create timer, returns timer.INVALID_TIMER_HANDLE if the timer can not be created |
timer.cancel(handle)
PARAMETERS
handle |
the timer handle returned by timer.delay() |
RETURNS
true |
if the timer was active, false if the timer is already cancelled / complete |
Indicates an invalid timer handle
Indicates an invalid timer handle