Originally Posted By: Wims
If I get it right, your example doesn't work :
one timer would be one /msg, when you see +m, you pause them, when you see -m, you resume them and they would all execute their /msg command at the same time (assuming -m is set after all timer delay reached 0) because of that "bug".


You are not correctly understanding the current behavior. With the current behavior, when you unpause a timer, the command will only be executed if the full delay has transpired since the previous time that the timer's command was executed. It will never execute more than once immediately after an unpause.

It might be more clear if I just give some examples. Suppose we have a timer with an interval of 10 seconds that is set to 5 repetitions. This is what would happen if you paused and unpaused at the indicated time:

00.0 sec : Start timer
10.0 sec : Timer triggers (1st time)
20.0 sec : Timer triggers (2nd time)
22.0 sec : Timer is paused
54.0 sec : Timer is unpaused
54.0 sec : Timer triggers (3rd time)
64.0 sec : Timer triggers (4th time)
74.0 sec : Timer triggers (5th time) and timer halted

Even though much time transpired while paused, the timer doesn't immediately execute multiple times after unpausing (i.e., it's not trying to "catch up"). It simply finishes the repetitions with the original interval.

Here's another example (same conditions):

00.0 sec : Start timer
10.0 sec : Timer triggers (1st time)
20.0 sec : Timer triggers (2nd time)
22.0 sec : Timer is paused
27.0 sec : Timer is unpaused
30.0 sec : Timer triggers (3rd time)
40.0 sec : Timer triggers (4th time)
50.0 sec : Timer triggers (5th time) and timer halted

I hope this clarifies what is currently happening and why my previous example of the message queuing script would work with this system.

Quote:
It's not about me, the problem has been reported five years ago, the actual behavior is simply wrong, it doesn't make any sense to use it as it is. Even for your case, noone would have used "paused timer" since noone would have expected it to work this way.


I disagree, I think this behavior makes a lot of sense. If your purpose is to ensure that the timer's command is never executed within 10 seconds of the previous time it was executed, this is good behavior.

Last edited by drum; 20/03/11 11:06 PM.