QueryPerformanceFrequency

QueryPerformanceFrequency retrieves the frequency of the high-resolution performance counter. The frequency cannot change while the system is running.

Syntax

Copy
BOOL QueryPerformanceFrequency(
    LARGE_INTEGER* lpFrequency
);

Parameters

lpFrequency

Pointer to a variable that receives the current performance-counter frequency, in counts per second. If the installed hardware does not support a high-resolution performance counter, this parameter can be zero.

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

eRTOS 1.0 SDK

windows.h rtkrnl.lib

See Also: