mIRC Home    About    Download    Register    News    Help

Print Thread
#93223 07/08/04 10:15 PM
Joined: Apr 2003
Posts: 701
K
Kelder Offline OP
Hoopy frood
OP Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
While making a script for adding a date line at midnight each day, I thought something like

alias putdate {
echo -s $date $time
.timerputdata 0:00 1 1 putdata
}

would seem nice. But that gave me 29 date lines, once every 2 seconds until it was 00:01 shocked

Is this considered normal behaviour or not? I know my alarm clock doesn't work like this grin

I know the alternatives: use
.timer 0:00 0 86400 echo -s $!date $!time
but I'm not convinced of the accuracy of this; or use
.timer 1 120 .timerputdata 0:00 1 1 putdata

Joined: Aug 2004
Posts: 16
S
Pikka bird
Offline
Pikka bird
S
Joined: Aug 2004
Posts: 16
That is normal behavior, because the timer isn't checking seconds.

From 00:00 to 00:01, all 60 seconds are 00:00, so it'll trigger that many times

Unfortunately, there's also no way to actually have it check seconds that I know of. I ran into this problem a while ago while I was scripting something, and my solution was to use the second option you suggested: .timer 1 120 .timerputdata 0:00 1 1 putdata.


Smay!

Link Copied to Clipboard