mIRC Homepage
Posted By: ScatMan help with /timer - 07/05/03 08:03 AM
-c switch will make a difference in /timer only if it's 0 0 right?
Posted By: neophyte Re: help with /timer - 07/05/03 08:06 AM
Quote:
If you specify the -c switch, this makes mIRC "catch up" a timer by executing it more than once during one interval if the real-time interval isn't matching your requested interval.



/help /timer
Posted By: ScatMan Re: help with /timer - 07/05/03 08:11 AM
u don't need to copy it from the helpfile i can do that myself,
i'm asking here becuz i don't understand from the helpfile
Posted By: neophyte Re: help with /timer - 07/05/03 09:08 AM
It's very easy to understand.



Try thinking of it like this:

The timer starts, and it is out of sync with the real time clock that mIRC runs. therefore it doesn't run exactly on time.
By specifying the -c switch, mIRC forces the timer to play catch up, until it's running in sync with the real time clock.

Or in simpler terms, it's like trying to catch up with a runner in an event that has a 5 second lead, you run super fast until you've caught up.

I also don't see the point of making at timer run every 0 seconds. Set it to run every one second instead

/timerName 0 1 { do something }
Posted By: ScatMan Re: help with /timer - 07/05/03 09:32 AM
what does mean 'catch up' ?
Posted By: neophyte Re: help with /timer - 07/05/03 10:39 AM
http://dictionary.reference.com/search?q=catch%20up
Posted By: _D3m0n_ Re: help with /timer - 07/05/03 05:31 PM
LMFAO @ pulling out dictionaries
Posted By: qwerty Re: help with /timer - 08/05/03 04:29 AM
It means that if, for some reason, mirc didn't execute the command associated with a timer in time, it triggers it right after it's finished doing whatever it's doing and before the next scheluded repetition. At least that's the effect I understand (I use it in one of my scripts to animate a dialog). It's not easy to understand exactly what I mean unless you have the proper conditions; something like a milliseconds timer with a short interval calling an intensive (cpu-wise) command. In such cases, it seems that more cpu is given to mirc for that, although the "regularity" of the repetitions is lost.
Posted By: ScatMan Re: help with /timer - 08/05/03 06:29 AM
yeah but once i did a command with /timer -c 0 0
and it work so fast that my computer stuck
Posted By: neophyte Re: help with /timer - 08/05/03 07:02 AM
thats because your telling the timer to run in what is essentially, an infinite loop.


thats why you need to specify a time greater than 0 for the command to actually be run.
Posted By: ScatMan Re: help with /timer - 08/05/03 08:51 AM
no, its NOT an infinite loop, its just a VERY FAST timer
i could stop it but it takes time becuz its very fast
Posted By: RoCk Re: help with /timer - 08/05/03 11:43 AM
If you were to set a timer /timerTest 0 0 echo -a test with or without -m .. you would see that mIRC makes it this * Timer test 1ms delay echo -a test .. mIRC won't go lower than 1ms delay.
Posted By: ScatMan Re: help with /timer - 08/05/03 12:06 PM
i still don't get it, what does the -c switch exactly?
Posted By: RoCk Re: help with /timer - 08/05/03 12:59 PM
I've never used it so I really don't know, but the 4th post in this thread (neophyte) seems to make the most sense to me.
Posted By: Nimue Re: help with /timer - 08/05/03 03:59 PM
If you type this you will see the timer start its repetitions after the loop has finished
Code:
//timerctest -m 3 500 echo -s $!ticks | var %a = $ticks,%b = %a + 1000 | while %a < %b { var %a = $ticks }


Now this one (identical except for the "c"), again the timer fires after the loop, but the first couple of reps are fired immediately the loop has finished, so as to 'catch up'.
Code:
//timerctest -mc 3 500 echo -s $!ticks | var %a = $ticks,%b = %a + 1000 | while %a < %b { var %a = $ticks }

Posted By: ScatMan Re: help with /timer - 08/05/03 09:04 PM
uhh got it
but can u explain why when i doing /timer -c 0 0 it works very very fast ??
Posted By: Nobodi Re: help with /timer - 09/05/03 01:27 AM
From the help file /help /timer

Quote:

If you specify a delay of 0 seconds, the timer will trigger immediately after the calling script ends.
© mIRC Discussion Forums