mIRC Home    About    Download    Register    News    Help

Print Thread
/timer Pause and Resume bug #69334 26/01/04 08:02 AM
Joined: Jan 2004
Posts: 18
N
Nutter Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: Jan 2004
Posts: 18
If you start, then pause a timer, the counter still appears to tick down to 1, then "halts" there. As soon as you resume the timer, it ticks the last second off the clock, and executes the command.

For example:
/timer 1 10 /echo -a *** test
* Timer 1 activated
/timer1 -p
* Timer 1 paused

[The timer is paused a second or two after its started]
[Wait 10 seconds or so]

/timers
* Active timers:
* Timer 1 1 time(s) 10s delay /echo -a *** test (GamesNET)

[Wait another 10 seconds or so (just to be sure)]

/timer1 -r
* Timer 1 resumed
*** test
* Timer 1 halted

[The last bit happening within a second of me resuming the timer]


Nutter
GameSurge IRC Network
www.gamesurge.net
Re: /timer Pause and Resume bug #69335 26/01/04 12:09 PM
Joined: Sep 2003
Posts: 70
M
madewokherd Offline
Babel fish
Offline
Babel fish
M
Joined: Sep 2003
Posts: 70
I just tried it here and it appears that the -p switch just prevents the timer from executing until it's resumed. So if you pause and resume within the 10 seconds, the timer will still trigger at the normal time. If the timer is late (as it does every time a timer is late), it'll trigger as soon as possible. It's not necessairily a bug, just the help fails to explain the behaviour.

It also appears to restart the clock each time it's triggered, unless you use the -c switch.

Re: /timer Pause and Resume bug #69336 28/01/04 03:05 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
the time delay is the amount of time before the next occurance of the command the timer has, it doesnt tick down every second, it just goes off as soon as its checked and its after that time, ie: set it off "timer 1 10 echo Blah" at exactly 12:46:19 and it well trigger as soon as timers are checked after 12:46:29, a -p pause the timer from running its commands (and thus other repetitions). The other thing i found with timers is if it is delayed from going off at 12:46:29
to sasy 12:46:32 the next one well go off at 12:46:42 ten seconds later. Which does kinda make sence, and you can correct that using -c

But i do agree with you, you would think a timer paused is a timer paused. but i guess its how its designed, each one trips after a period of time from its start time, not after a period of time running.

Re: /timer Pause and Resume bug #69337 30/01/04 06:45 AM
Joined: Jan 2004
Posts: 18
N
Nutter Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: Jan 2004
Posts: 18
Quote:
The -pr switches pause and resume a timer respectively.


I just read that as it pauses the timer, not the command its going to execute. (That's what I need it to do too, pause the timer - stop the clock ticking down).



Nutter
GameSurge IRC Network
www.gamesurge.net
Re: /timer Pause and Resume bug #69338 30/01/04 11:23 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
i suggest these...

alias fix.timer.pause {
$+(.timer,$$1,.resume 1 0 .timer,$$1,.resumedelay 1 $timer($$1).secs .timer,$$1 -r)
$+(.timer,$$1,.resume -p)
$+(.timer,$$1 -p)
}

alias fix.timer.resume {
$+(.timer,$$1,.resume -r)
}

you are responseable for passing it valid timers in $1
It does no error checking beyond not doing anything is $1 is empty.

It well cause the timer to be paused and resumed as you would like it.