QueryUnbiasedInterruptTimePrecise function (realtimeapiset.h)

Gets the current unbiased interrupt-time count, in a more precise form than QueryUnbiasedInterruptTime does. The unbiased interrupt-time count does not include time the system spends in sleep or hibernation.

Syntax

void QueryUnbiasedInterruptTimePrecise(
  [out] PULONGLONG lpUnbiasedInterruptTimePrecise
);

Parameters

[out] lpUnbiasedInterruptTimePrecise

A pointer to a ULONGLONG in which to receive the unbiased interrupt-time count in system time units of 100 nanoseconds. Divide by ten million, or 1e7, to get seconds (there are 1e9 nanoseconds in a second, so there are 1e7 100-nanoseconds in a second).

Return value

None

Remarks

QueryUnbiasedInterruptTimePrecise is similar to the QueryUnbiasedInterruptTime routine, but is more precise. The interrupt time reported by QueryUnbiasedInterruptTime is based on the latest tick of the system clock timer. The system clock timer is the hardware timer that periodically generates interrupts for the system clock. The uniform period between system clock timer interrupts is referred to as a system clock tick, and is typically in the range of 0.5 milliseconds to 15.625 milliseconds, depending on the hardware platform. The interrupt time value retrieved by QueryUnbiasedInterruptTime is accurate within a system clock tick.

To provide a system time value that is more precise than that of QueryUnbiasedInterruptTime, QueryUnbiasedInterruptTimePrecise reads the timer hardware directly, therefore a QueryUnbiasedInterruptTimePrecise call can be slower than a QueryUnbiasedInterruptTime call.

Call the KeQueryTimeIncrement routine to determine the duration of a system clock tick.

Also see Remarks in QueryUnbiasedInterruptTime.

Note  The QueryUnbiasedInterruptTimePrecise function produces different results on debug ("checked") builds of Windows, because the interrupt-time count and tick count are advanced by approximately 49 days. This helps to identify bugs that might not occur until the system has been running for a long time. The checked build is available to MSDN subscribers through the Microsoft Developer Network (MSDN) Web site.
 
To compile an application that uses this function, define _WIN32_WINNT as 0x0601 or later. For more information, see Using the Windows Headers.

Requirements

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

See also

Interrupt Time

QueryInterruptTime

QueryInterruptTimePrecise

QueryUnbiasedInterruptTime

System Power States

Windows Time