GetTickCount not accurate enough?

Started by
4 comments, last by zedzeek 18 years, 9 months ago
The windows' GetTickCount function seems not to be accurate enough, specially under 100 ms, and this messes up my frame-length counter, which I need for time based movement. It seems that the GetTickCount function does not return the actual number of milliseconds, it always returns as tens of milliseconds . For example it returns numbers like these: 20,50,120...etc. And when I have a very high frame rate(>100fps), and the latency is under 10ms, I get 0. Yes, 0. And everything is screwed up. Goodbye time based motion. Actually I don't know if other people use GetTickCount to make their time based movement. Is there a better function? Or maybe get the counter from a BIOS call? //Mr.WereWolf//
Advertisement
I think this might help: Better Timer Article [grin]

That might help, thanks!

//Mr.WereWolf//
If you're interested, you might also want to check out fixed time step game loops.
Old post I have on high resolution timers.
the above article is old i think
ill point out that queryperformancecounter should not be used in a games its to unreliable
with laptops (and new amd/intel desktop) processors doing speed throttling its to unrealiable
unreal + quake etc use timeGetTime()

This topic is closed to new replies.

Advertisement