Timers

Blitz3D Forums/Blitz3D Beginners Area/Timers

luke101(Posted 2003) [#1]
Hello, I wanted my program to do a certain task every 5 seconds. Any ideas on how to do this


D2006(Posted 2003) [#2]
use MilliSecs()

start_time = MilliSecs()

;MAINLOOP
while ...

...
IF MilliSecs()>start_time+5000 THEN
Do sth.
start_time=MilliSecs()
ENDIF
...

wend