This might seem like a really basic question but, When dividing the output of
QueryPerformanceCounter with QueryPerformanceFrequency, what is the resulting value in, i.e. seconds, milliseconds, microseconds?
I’m asking because I’m porting some code from Windows to Linux and I don’t have a windows machine handy to experiment with. Some googling around provided no concrete answer for me.
First Google search result for “QueryPerformanceCounter”: the MSDN documentation for
QueryPerformanceCounter()Here’s what it has to say:
First Google search result for “QueryPerformanceFrequency”: the MSDN documentation for
QueryPerformanceFrequency()Here’s what it has to say:
The value obtained from
QueryPerformanceCounter()is in counts. The value obtained fromQueryPerformanceFrequency()is in counts per second. Using a bit of dimensional analysis:Therefore, the result of dividing the two values is in seconds.