Different combination of timer initialization arguments for period and count (2nd and 3rd argument of addtimer()):
period | count | effect |
---|---|---|
0 | 1 | call timer_cb once, but only after the script finished initialization (async); 0 means "0 seconds after the current script call returns" - but in practice this is a shortest non-zero time the timer system can do |
1.2 | 1 | call timer_cb once, in 1.2 sec from now |
0.5 | 3 | call timer_cb three times, with 0.5 sec in between |
All timers start counting after a short period of time after the script's initialization finished. The three timers are kept track on separately.