[SDL] How calculate the frame per seconds
David Olofson
david at olofson.net
Tue May 18 06:42:58 PDT 2004
On Tuesday 18 May 2004 15.39, David Olofson wrote:
[...]
> Yeah, that's "mspf"; milliseconds per frame. What you want is
> fps = 1 / (newtime - oldtime);
Oops. Make that
fps = 1000.0f / (newtime - oldtime);
(Still dealing with ms here. :-)
//David Olofson - Programmer, Composer, Open Source Advocate
.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
--- http://olofson.net --- http://www.reologica.se ---
More information about the SDL
mailing list