better timerGlobal_Tick

the old code used lots of CPU for a simple task, now it's better