QueryPerformanceCounter
QueryPerformanceCounter retrieves the current value of the high-resolution performance counter.
Syntax
BOOL QueryPerformanceCounter(
LARGE_INTEGER* lpPerformanceCount
);
Parameters
lpPerformanceCount
Pointer to a variable that receives the current performance-counter value, in counts.
Return Value
If the function succeeds, it returns a non-zero value; if the function fails, it returns 0 (zero) .
To get extended error information, call GetLastError.
Remarks
Use QueryPerformanceCounter rather than RtGetClockTime. Using RtGetClockTime on more than one processor retrieves times that are not accurately aligned with each other, even when the functions are executed simultaneously.
To specify processor affinity for a thread, use the SetThreadAffinityMask function.
Requirements
Minimum supported version | Header | Library |
---|---|---|
eRTOS 1.0 SDK |
windows.h | rtkrnl.lib |
See Also: