The timerinfo( function returns a dictionary that contains all of the properties of a timer.
Parameters
This function has one parameter:
name – name of the timer (must have been set up with the StartTimer statement).
Description
This function returns a dictionary that contains all of the properties of the specified timer. You can then use these functions to extract the property values:
This example will display how many more times the alarm timer will run.
local tinfo,truns,trepeats
tinfo = timerinfo("alarms")
truns = getdictionaryvalue(tinfo,"RunCount")
trepeats = getdictionaryvalue(tinfo,"MaxCount")
if trepeats = 0
message "alarms will run forever"
else
message "alarms will run "+(trepeats-truns)+" more times."
endif
Error Messages
timerinfo( function error: timer does not exist – There is no timer with the specified name
See Also
History
Version | Status | Notes |
10.0 | New | New in this version. |