I think your game processing is being halted and your timing routine is actually the problem (should reset itself if it detects it has just suffered a long pause)? eg:
Graphics 640,480,0 t=MilliSecs() While PollEvent()<>EVENT_APPTERMINATE SetClsColor Rnd(255),Rnd(255),Rnd(255) Cls Flip tt=MilliSecs() If tt-t>200 Print "resetclock" t=tt Wend End