NEVER EVER use TTimer object for a game! hehe
It's really the most unreliable timer object I know!
GetTickCount is quite accurate, however you can set the accuracy/resolution for this timer, which will also make it run sync on each system...
(and yes the code above is C++, taken from here:Code:// Initialization DWORD TickResolution; TIMECAPS TimeCaps; if (timeGetDevCaps(&TimeCaps, sizeof(TIMECAPS)) == TIMERR_NOERROR) { TickResolution = min(max(TimeCaps.wPeriodMin, 1U), TimeCaps.wPeriodMax); timeBeginPeriod(TickResolution); } ... // All game stuff // Cleanup timeEndPeriod(TickResolution);
http://www.intheoryforum.com/viewtop...asc&highlight=)
Bookmarks