Timer Question
Blitz3D Forums/Blitz3D Programming/Timer Question| 
 | ||
| What code would i use to count in seconds how long my program has been running for ? thankyou | 
| 
 | ||
| At the beginning of your program, set a StartTime variable. Just before your program ends set a StopTime variable. Subtract the two and divide by 1,000 to get seconds. StartTime = millisecs() StopTime = millisecs() DurationSeconds = StopTime - StartTime / 1000 | 
| 
 | ||
| It should be: DurationSeconds = ( StopTime - StartTime ) / 1000 You don't need the StopTime, just replace with millisecs() again. | 
| 
 | ||
| This shows how long the program is running, and you can change the offset so you can make it update every second, or minute, or whenever ;) |