OK, heres some code to test:
Strict Type TSuperTimer Global timerlist:TList=New TList Global systemtimer:TTimer Global systemtimerevent:TEvent Field _event:TEvent Field _hertz# Field _count Field _millis Field _ticks Method Stop() timerlist.Remove Self End Method Method Create:TSuperTimer( hertz#,event:TEvent=Null ) InitSystemTimer _event=event _hertz=hertz _millis=MilliSecs() timerlist.AddLast Self Return Self End Method Method Update(ms) Local count count=((ms-_millis)*_hertz)/1000 If count>_count _count=count _ticks:+1 If _event EmitEvent _event Else EmitEvent CreateEvent( EVENT_TIMERTICK,Self,_ticks ) EndIf EndIf End Method Function InitSystemTimer() If systemtimer Return systemtimerevent=CreateEvent( EVENT_TIMERTICK,Null,0 ) AddHook EmitEventHook,supertimerhook systemtimer=CreateTimer(100,systemtimerevent) End Function Function supertimerhook:Object( id,data:Object,context:Object ) Local ms Local t:TSuperTimer If data<>systemtimerevent Return data ms=MilliSecs() For t=EachIn timerlist t.Update(ms) Next End Function End Type Function CreateSuperTimer:TSuperTimer(hertz#,event:TEvent=Null) Return New TSuperTimer.Create(hertz,event) End Function ' test code below For Local i=1 To 1000 createsupertimer(10) Next While WaitEvent() DebugLog "tick"+EventData() Wend