is it a bug of EnableTimer

Posted by Jing Wu on Sat 24 May 2008 10:10 AM — 2 posts, 13,488 views.

Australia #0
Hi,

I add a timer using AddTimer without timer_flag.enabled, then use SetTimerOption to change some options.
now once i EnableTimer(timer, true), this timer fires at once event i set the interval to 10 seconds.

A suggest, why there is no AddTimerEx like AddTriggerEx allowing to set the "timer name" and "send to". please add this.

thanks!
Australia Forum Administrator #1
Enabling a timer simply turns it on. You need to reset it to make it recompute when to fire from last time. See:

http://www.gammon.com.au/scripts/doc.php?function=ResetTimer

Note that you should enable it first, then reset it, as documented for ResetTimer.

Quote:

... why there is no AddTimerEx like AddTriggerEx allowing to set the "timer name" and "send to".


AddTimer lets you set the timer name - that is the first argument.

http://www.gammon.com.au/scripts/doc.php?function=AddTimer

For other fields you have a few options: