It seems that other -h timers can corrupt a pre-existing -h timer's interval.
With a fresh mIRC installation (or just with mirc.exe 7.19 copied to a temp directory and run -portable):
1. Add this to your remote script:
alias test {
var %temp = $ticks
if (%lastTicks != $null) echo -s interval (ms): $+ $calc($ticks - %lastTicks)
set %lastTicks %temp
}
2. Type this command in your status window, and you should see a (fairly) accurate timer begin firing every 1 second:
/.timertest1 -ioh 0 1000 /test
3. Now copy all four commands below to your clipboard, and paste them into your status window, hitting enter to run all 4 at once:
/.timertest2 -ioh 1 0 .timerblah1 -iom 0 3000 /noop
/.timertest3 -ioh 1 100 .timerblah2 -iom 0 3000 /noop
/.timertest4 -ioh 1 200 .timerblah3 -iom 0 3000 /noop
/.timertest5 -ioh 1 300 .timerblah4 -iom 0 3000 /noop
Your original timer's high resolution will now be history. Example:
(I run the /timertest1 command here)
interval (ms):1002
interval (ms):1001
interval (ms):1002
interval (ms):1001
interval (ms):1002
interval (ms):1001
interval (ms):992
interval (ms):1001
interval (ms):1001
interval (ms):1002
interval (ms):1001
interval (ms):1002
interval (ms):1001
interval (ms):992
interval (ms):1001
interval (ms):1001
interval (ms):1002
interval (ms):1001
interval (ms):1002
interval (ms):1001
interval (ms):992
interval (ms):1001
interval (ms):1002
interval (ms):1001
(I paste and run the /timertest2-5 commands here)
interval (ms):1593
interval (ms):1602
interval (ms):1602
interval (ms):1602
interval (ms):1593
interval (ms):1602
interval (ms):1602
interval (ms):1603
interval (ms):1592
interval (ms):1602
interval (ms):1603
interval (ms):1602
interval (ms):1602
interval (ms):1592
interval (ms):1603
The number of miliseconds by which timer 'test1' speeds up or slows down seems random. Sometimes, pasting and executing the other timers causes 'test1' to speed up (e.g. -100 ms off). Other times, 'test1' slows down (e.g. +50ms off, +400ms off, +600ms off, etc.). In any case, after starting 'test1', just repeatedly paste-execute the extra 4 timer commands, and you'll see what I mean -- each time you do, how much the interval of 'test1' strays +/- from 1000 ms will be different.
P.S. Is there a reason -- or is it an unrelated bug -- that mIRC's $ticks function itself has low resolution? It seems to always round to 10ms or 11ms (note the many 1001/1002's vs. 992's ... and 1602/1603's vs. 1592/1593's above above).