TimeToElapse
Syntax
long timeToElapse(timer t) (Form 1)
long timeToElapse(mstimer t) (Form 2)
Method(Dynamic)
long msTimer::timeToElapse();
Function
Returns a value indicating how much more time will elapse before anon timerevent procedure is called. For form 1, the time value is returned in seconds; for form 2, the time value is returned in milliseconds. If the timer is not active, -1 is returned. This is also the case in theon timerevent procedure itself.
Parameters
timerormstimervariable
Return Values
Time to go until the timer elapses and the event procedure is called.
timer t;setTimer(t, 5);write("Time to elapse: %d", timeToElapse(t)); // writes 5
Class: Timer, MS Timer | setTimer | cancelTimer | isTimerActive