Timer help plz

Blitz3D Forums/Blitz3D Beginners Area/Timer help plz

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

;outside main loop
EndTime=Millisecs()+900000
;inside main loop
TimeRemaining=(EndTime-millisecs())/1000 ;in seconds
MinutesRemaining=TimeRemaining / 60 ;in minutes
Seconds=TimeRemaining Mod 60 ;in seconds
text 0,0,MinutesRemaining+":"+Seconds
If Millisecs()>EndTime then EndGameFunction()