• Advertisement
Sign in to follow this  

broken timer values workaround

This topic is 4329 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I use the timer from GLFW, which I guess on Windows is QueryPerformanceCounter although I'm not sure. Once in a while, it gives totally wrong values. After googling I suspect it is because i have AMD cool 'n quiet installed, which can change cpu frequency and thus mess with the timer. There are similar issues on Intel speedstep and dual-core processors: some random thread about this. I've found the RDTSC asm instruction which I could use with inline assembler, but I think it will suffer the same issues. Do you know a good workaround and what are the caveats? Should I use a different, less accurate timer or measure some average, and when the timestep deviates too much from it ignore it or something like that?

Share this post


Link to post
Share on other sites
Advertisement
Thank you for the information. Reading the article and the thread I linked to better, it seems that QueryPerformanceCounter reads the actual frequency of the core with cool 'n quiet, while QueryPerformanceFrequency still gives the same (incorrect) value.
There is a hotfix for XP, haven't tried it but thought I would mentioned it here anyway. It is said Vista will fix this.

I will go for the clamping and try averaging if clamping doesn't work out.


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement