mIRC Home    About    Download    Register    News    Help

Print Thread
help with /timer #22914 07/05/03 08:03 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
-c switch will make a difference in /timer only if it's 0 0 right?

Re: help with /timer #22915 07/05/03 08:06 AM
Joined: Apr 2003
Posts: 426
neophyte Offline
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
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


--------
mIRC - fun for all the family (except grandma and grandpa)
Re: help with /timer #22916 07/05/03 08:11 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
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

Re: help with /timer #22917 07/05/03 09:08 AM
Joined: Apr 2003
Posts: 426
neophyte Offline
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
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 }

Last edited by neophyte; 07/05/03 09:10 AM.

--------
mIRC - fun for all the family (except grandma and grandpa)
Re: help with /timer #22918 07/05/03 09:32 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
what does mean 'catch up' ?

Re: help with /timer #22919 07/05/03 10:39 AM
Joined: Apr 2003
Posts: 426
neophyte Offline
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426


--------
mIRC - fun for all the family (except grandma and grandpa)
Re: help with /timer #22920 07/05/03 05:31 PM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
LMFAO @ pulling out dictionaries


D3m0nnet.com
Re: help with /timer #22921 08/05/03 04:29 AM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: help with /timer #22922 08/05/03 06:29 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
yeah but once i did a command with /timer -c 0 0
and it work so fast that my computer stuck

Re: help with /timer #22923 08/05/03 07:02 AM
Joined: Apr 2003
Posts: 426
neophyte Offline
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
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.


--------
mIRC - fun for all the family (except grandma and grandpa)
Re: help with /timer #22924 08/05/03 08:51 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
no, its NOT an infinite loop, its just a VERY FAST timer
i could stop it but it takes time becuz its very fast

Re: help with /timer #22925 08/05/03 11:43 AM
Joined: Dec 2002
Posts: 2,021
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,021
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.

Re: help with /timer #22926 08/05/03 12:06 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
i still don't get it, what does the -c switch exactly?

Re: help with /timer #22927 08/05/03 12:59 PM
Joined: Dec 2002
Posts: 2,021
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,021
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.

Re: help with /timer #22928 08/05/03 03:59 PM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
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 }


Re: help with /timer #22929 08/05/03 09:04 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
uhh got it
but can u explain why when i doing /timer -c 0 0 it works very very fast ??

Re: help with /timer #22930 09/05/03 01:27 AM
Joined: Dec 2002
Posts: 191
N
Nobodi Offline
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
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.