timer question

Blitz3D Forums/Blitz3D Programming/timer question

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.

use the millisecs() command


;five minutes in millisecs = 1000 * 60 * 5
timer=millisecs()+(1000*60*5)

;main loop
repeat

;check if the five minutes has passed
if millisecs()>timer

;reset the timer again
timer=millisecs()+(1000*60*5)

goto yourlabelhere

endif


until keydown(1)


hope this makes sense :-)