how to do some processing at set time intervals

BlitzMax Forums/BlitzMax Programming/how to do some processing at set time intervals

A timer with timed "callbacks" measured in millisecs (of 100 in this case).

SuperStrict

Framework wx.wxApp
Import wx.wxTimer
Import BRL.StandardIO

Type MyApp Extends wxApp

	Field timer:MyTimer

	Method OnInit:Int()

		timer = MyTimer(New MyTimer.Create())
		timer.Start(100)
	
		Return True
	
	End Method

End Type

Type MyTimer Extends wxTimer

	Field count:Int

	Method Notify()	
		count:+1
		
		Print "Tick (" + count + ")"
		
		If count = 50 Then
			End
		End If
		
	End Method

End Type

New MyApp.run()


This is only one way of using wxTimer, of course.