mIRC Home    About    Download    Register    News    Help

Print Thread
#265261 24/03/19 06:04 AM
Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Can you please give an example of something where the change from system time to $ticks should be obvious? Since I didn't see anything change here, I'm guessing 'main timer' means something else besides '/timer'? Some of what I see so far is good, but not all.

//timerx1 $time($calc($ctime + 300)) 1 0 echo -a x1 $!asctime | /timerx2 1 300 echo -a x2 $!asctime | echo -a launched at $asctime

If I set the clock forward by 3 minutes immediately after launching these commands, the behavior is identical old-vs-new, which is good. 'x1' continues to trigger at the original HH:nn:00 clock time, and 'x2' triggers at a clock time that's a few seconds less than the extra 3 minutes, which might be caused by Windows itself.

Possible problem:

If you instead set the clock forward by 1 hour, 'x2' continues to execute at a time that's based on the real-world interval of 300 seconds regardless of the change in clock time. However the 'x1' timer shifts its target time forward 23 hours until that same clock time the next day.

There may be timers that want to be executed once per day at a specific time, or there may be timers that want to to be executed only when the clock time is a specific HH:nn value, but right now there's only the 2nd alternative.

If this behavior is by design, a workaround might be to allow the -c switch to be relevant in the phase prior to a HH:nn timer reaching the HH:nn trigger time. I assume this helps people whose mIRC goes in/out of hibernate, or the internet clock synch changes the time by several minutes at an unfortunate time.

Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
Almost every feature in mIRC uses ticks for time measurement. There were only a few featurs that did not and those are the ones that were changed in the beta. An example of a timer that was moved from using system time to ticks is the timer in the Timer dialog.

Quote:
If you instead set the clock forward by 1 hour

There are no plans to cater for this or other side-effects due to changes to system time made by the user. Once we start down this road, we would end up having to take into account every conceivable side-effect, which is beyond what mIRC is designed for.

The current change was simply to move from system time to ticks for some features, to conform with how all other features measure time.

Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Ok. I thought I gave examples of time changes not intentionally made by the user. The weekly internet time synch where you can't define the scheduled time, or computers going into sleep/hibernation mode.

Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
Originally Posted by maroon
Ok. I thought I gave examples of time changes not intentionally made by the user. The weekly internet time synch where you can't define the scheduled time, or computers going into sleep/hibernation mode.

Nice try, but no cigar :-)

I am sure that, if we really wanted to, we could come up with a hundred ways that a change in system time could affect normal applications.

The change made in the recent beta focused on improving older features, that unncecessarily used system time to measure time, so that they used tick counts to measure time, like most features in mIRC. That's it.


Link Copied to Clipboard