Problem with timer.

BlitzMax Forums/BlitzMax Beginners Area/Problem with timer.

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.

The problem seems to be that bmx itself needs a millisec for the timer to be created. Once you create them faster than bmx can handle it it comes to an overflow.
I thought that too, however creating five or six in a row, works aswell. More likely it's a (Windows?) limitation on ammount of concurrent Timers?

This code seems to work:
Strict

Local timer:TTimer = CreateTimer(60)

Graphics 640 , 480
While Not KeyHit(Key_Escape)
	Cls
	DrawText TimerTicks(timer) , 10 , 10
	DrawText timer.toString(),10,20

	
	If KeyHit(KEY_SPACE) 
		StopTimer timer
		timer = CreateTimer(60)
	EndIf
	Flip
Wend