SetTimerCyclic
Syntax
void setTimerCyclic(msTimer t, long firstDuration, long period); // form 1
void setTimerCyclic(msTimer t, long period); // form 2
Method(Dynamic)
void msTimer::setCyclic(long firstDuration, long period);
void msTimer::setCyclic(long period);
Function
Sets a cyclical timer. With form 2,firstDurationis implicitly the same as period, i.e. the timer runs precisely according to period the first time.
Parameters
t The timer to be set.
firstDuration
Time in milliseconds until the timer runs out for the first time.
period
Time in milliseconds in which the timer is restarted in case of expiration.
Return Values
—
Starting of a timer that expires the first time 10 ms after the start of measurement and thereafter every 20 ms (10 ms, 30 ms, 50 ms, 70 ms etc.) variables {msTimer t;}on start {setTimerCyclic(t, 10, 20)}
cancelTimer | setTimer