I havent really looked at what you wrote, but thought I might mention that mirc using -h or -m cant get much more accuarate than every 16 to 17ms, ie: if you do

//set %i 0 | .timer -m 0 1 inc %i | .timer 0 1 echo -st % $+ i | timer
* Active timers:
* Timer 1 1ms delay inc %i
* Timer 2 1s delay echo -st %i
[17:09:21] 65
[17:09:22] 129
[17:09:23] 189
[17:09:24] 253
[17:09:25] 315
[17:09:26] 377
[17:09:27] 438

When if it was going off every 1ms the number should be going up in 1000 increments