ConvertPerformanceCounterToAuxiliaryCounter function (realtimeapiset.h)

Converts the specified performance counter value to the corresponding auxiliary counter value; optionally provides the estimated conversion error in nanoseconds due to latencies and maximum possible drift.

Syntax

HRESULT ConvertPerformanceCounterToAuxiliaryCounter(
  [in]            ULONGLONG  ullPerformanceCounterValue,
  [out]           PULONGLONG lpAuxiliaryCounterValue,
  [out, optional] PULONGLONG lpConversionError
);

Parameters

[in] ullPerformanceCounterValue

The performance counter value to convert.

[out] lpAuxiliaryCounterValue

On success, contains the converted auxiliary counter value. Will be undefined if the function fails.

[out, optional] lpConversionError

On success, contains the estimated conversion error, in nanoseconds. Will be undefined if the function fails.

Return value

Returns S_OK if the conversion succeeds; otherwise, returns another HRESULT specifying the error.

Return value Description
S_OK
The function succeeded.
E_NOTIMPL
The auxiliary counter is not supported.
E_BOUNDS
The value to convert is outside the permitted range (+/- 10 seconds from when the called occurred).
E_BOUNDS
The value to convert is prior to the last system boot or S3/S4 transition.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1703 [desktop apps | UWP apps]
Minimum supported server Windows Server 2016 [desktop apps | UWP apps]
Target Platform Windows
Header realtimeapiset.h
Library Mincore.lib
DLL Kernel32.dll