Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

hi-res counter

Name: Anonymous 2008-10-25 23:17

So I'm coding a game and trying to maintain a steady game speed (ie. framerate) and I found some Windows functions called QueryPerformanceCounter and QueryPerformanceFrequency.

Using these looks more reliable for controlling a game loop than say, clock() shit from time.h or something.  The only problem is that I've seen this:

>If the installed hardware supports a high-resolution performance counter

I've tried it and it works 100% fine on my machine.  But I'm wondering what sort of hardware would NOT support this?  Is it likely that if I distributed my game that many users would not have the performance counter?

Name: Anonymous 2008-10-26 3:25

If it's a Pentium or newer, it has the performance counters. However, they're not reliable if the system's clock frequency changes (eg. if you have something like SpeedStep active). There's also some issues with SMP systems.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List