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

A non-zero value if the function succeeds, 0 (zero) if the function fails

To get extended error information, call GetLastError.

Remarks

On a multiprocessor computer, 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

Library Rtx_Rtss.lib

See Also:

QueryPerformanceFrequency

IntervalZero.com | Support | Give Feedback