View Full Version : setting FPS

06-04-2005, 12:52 PM
I am writing a program that I want to run at the same speed on all machines that can handle it. I am guessing this probably lies in setting the frames per second, but I don't know how to do that. Could someone post some code to show me how please?

Ehsan Kamrani
06-04-2005, 01:23 PM
Another solution is to use from the timer.As an example:
float elapsedTime;
float oldTime;
float currentTime;
currentTime = <CURRENT_TIME> //Use from the appropriate function
elapsedTime = currentTime - oldTime;
oldTime = currentTime;
<use from the elapsedTime in your program>

06-04-2005, 01:25 PM
I'm not sure what you mean.

Ehsan Kamrani
06-04-2005, 01:35 PM
Doesn't it solve your problem?

06-04-2005, 01:48 PM
I get it now, thanks.