Fast: http://imgur.com/ReJ2Xl&UH61c
Slow: http://imgur.com/ReJ2X&UH61cl
As you can see, it's only about a 0.02ms difference, but I don't know what's causing it. For all I know, it may get progressively worse as I add sprites/text/whatever. When the application decides to run slowly, the speed will never go faster than the what you see in the "Slow" image above.
What I've Noticed/Tried:
- The speed varies between launches, so at first, I thought I was using an uninitialized variable somewhere; However, I checked my code, and all of my variables are initialized.
- I removed my timer class and measured FPS with Fraps. The application behaves the same way.
- My test application does the same thing on my friend's computer.
- I ran Very Sleepy, a profiler, and profiled the application in both speeds. There are differences between the two, but as I've never used a profiler, I don't really know how to interpret the information.
- Interestingly, Frank Luna's sample programs suffer from this same problem. Either we've both made the same mistake, or something is going wrong when I compile.
I zipped my VSProject and source files and uploaded them to megaupload in case you'd like to take a look, but you'll need boost installed to compile GameTimer:
http://www.megaupload.com/?d=V2QG6EBS
IDE: Visual Studio 2008 Express
DX SDK: June 2010