History: -QueryPerformanceCounter
Preview of version: 1
- «
- »
Todo on this page:
- add useful forum links (e.g. with code snippets)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | 0-9
The QueryPerformanceCounter is the most precise time stamp counter on Windows systems.
It's useful e.g. for FPS calculations.
Notes:
- The value of QueryPerformanceFrequency never changes, while a system is running.
- Aware: It's possible that QueryPerformanceFrequency returns 0 on some hardware systems.
- Aware: The difference between an older and a newer value of the QueryPerformanceCounter can be negative. (This can happen when the thread moves from one CPU core to an other.)
See also:
- Game Timing and Multicore Processors - important notes
- QueryPerformanceCounter - AP description
- QueryPerformanceFrequency - API description
- Time Stamp Counter - Wikipedia
- How To Use QueryPerformanceCounter to Time Code - MSDN page with code snippets
- High Precision Event Timer (HPET) - Wikipedia, formerly Multimedia Timer
- Performance counter value may unexpectedly leap forward - MSDN
- How to use the QueryPerformanceCounter in Visual C# - MSDN; Code snippet for use Mogre