PDA

View Full Version : Timing for games. Is there anything like SDL_GetTicks



ricardo
7th August 2009, 19:29
Hi friends :)

My level editor has the possibility to its play levels. Now I'm working on timing. a QTimer is not enough because my objects' state charts must know what is the current time with a milisecond precission.

I use a QTimer object to launch an update method every 20 ms (that is, 50 frames per second), but I don't find any method/object on QT libs like SDL_GetTicks (milisecons since app was launched, I use this to program my objects' state charts)

Do you have any idea or suggestion?

Thanks in advance

numbat
8th August 2009, 11:24
See QTime, notably the start and elapsed functions.