I'm reading about timing, and I'm wondering if I got this right.
int FPS = 60;
LARGE_INTEGER lastUpdate = counter;
if (counter.QuadPart > (lastUpdate.QuadPart + (frequency.QuadPart / FPS)))
lastUpdate = counter;
// Are things in here happening every 60 second? \(^o^)/
Will this limit Things to exactly 60 FPS, and will it change correctly when I change the FPS variable?
I'm not quite sure how I can measure if it works, because if I add code to show the FPS somehow, that code would rely on what I'm trying to do, which would make it wrong if the code is wrong >:D
Topic archived. No new replies allowed.