Jump to content
  • Advertisement
Sign in to follow this  
Supernat02

System Timers are Slowing Down

This topic is 3152 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 have some Windows code for a timer that is pretty straight forward. It calls QueryPerformanceFrequency to get the high perf clock freq and then calls QueryPerformanceCounter each frame at the beginning. The code performs a Sleep(1) until a specified amount of time (33 ms) has passed. This is all it does, just sleeps until X ms has passed to force a specific frame rate, I disabled all code running after this. What I'm seeing is that over time, after my PC has been running a while, the QPC return value doesn't change between calls. So I sleep 1 ms, call QPC and the same integer is returned as the previous call before sleeping. I do this repeatedly and then all of the sudden the returned value is a 10 ms or higher jump from the previous value (or any # of ms, 10 just example). I've placed a hysteresis buffer in to be sure that's what is happening. I get the same problem with timeGetTime or getTickCount. It gets worse over time. If I reboot my PC, I get exactly 33.33 ms (30 Hz). I run my PC for a few hours (just my PC, not the software in question), then it's running at 40.5 ms, then a day later at 60.4 ms, etc until just now it was running at 125 ms. Then I rebooted and it went back to 33 ms. The best I can tell, there may be something wrong with my system, the CPU itself, or the motherboard. I have a quad core 2.33 Intel and an EP45-UD3P Gigabyte motherboard. Has anyone ever heard of this before? Thanks! Chris

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!