QueryPerformanceFrequency
QueryPerformanceFrequency retrieves the frequency of the high-resolution performance counter, if one exists. The frequency cannot change while the system is running.
Syntax
BOOL QueryPerformanceFrequency(
[out] LARGE_INTEGER* lpFrequency
);
Parameters
[out] lpFrequency
Pointer to a variable that receives the current performance-counter frequency, in counts per second. This parameter can be zero if the installed hardware does not support a high-resolution performance counter.
Return Value
If the installed hardware supports a high-resolution performance counter, it returns a non-zero value. If the function fails, it returns 0 (zero).
For example, if the installed hardware does not support a high-resolution performance counter, the function fails.
To get extended error information, call GetLastError.
Remarks
The frequency of the high-resolution performance counter is not the processor speed.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
windows.h |
wRTOS_rtss.lib |
In Windows applications, this function is available by including RtApi.h and linking to RtApi.lib.
See Also: