Do I require timing code?

BlitzMax Forums/BlitzMax Beginners Area/Do I require timing code?

po(Posted 2006) [#1]
Would I require timeing code in my GUI application? By timing code I mean code which slows a program down so that it runs the same speed on all computers.
The reason I ask is, I think my program may already have timing code. My program is a window with a canvas in it. The canvas gets redrawn 60 times a second via a timer which I have created. So what I'm asking is, does the timer which I have created using CreateTimer(60) run at the same speed on all computers already?


H&K(Posted 2006) [#2]
Yep runs at 60 Hrtz.


Hotcakes(Posted 2006) [#3]
Yes, a Timer(60) ticks 60 times per second. Wouldn't do much good if it changed for different computers now, would it =]


po(Posted 2006) [#4]
I suppose it wouldn't, no :)


Grey Alien(Posted 2006) [#5]
timing code (to compensate for different PC speeds) is not required for GUI apps as they need to run as fast as possible usually. But of course if you have a dispay if somekind in the GUI that needs to run at a consistent speed, the CreateTimer will work - although as with most windows apps, you'll get vertical tearing in the window as it will be updated at a different speed from the screen Hz.


klepto2(Posted 2006) [#6]
The most problem with Timing code is the fact, that if a PC is slower then yours and doesn't reach the desired 60 FPS.
So it is totally equal if your using a Canvas or a non Gui 2d window, in both cases it would be a good thing to implement some timing code(eg: delta-timing).