Original Post
🔒 Locked
QueryPerformanceCounter()
Advertisement
Is QueryPerformanceCounter() guaranteed to return microseconds? The documentation does not say so, and if so, why would there be a QueryPerformanceFrequency() function? Do not rely on the frequency being in microseconds. It may change between different hardware.
QueryPerformanceFrequency() returns the number of counts per second. So in terms of a second, divide the count by the frequency. Then to get milliseconds, multiply by 1000.
((float)count / (float)frequency) * 1000
Steve 'Sly' Williams
Tools Developer
Krome Studios
QueryPerformanceFrequency() returns the number of counts per second. So in terms of a second, divide the count by the frequency. Then to get milliseconds, multiply by 1000.
((float)count / (float)frequency) * 1000
Steve 'Sly' Williams
Tools Developer
Krome Studios
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement