QueryUnbiasedInterruptTime function (realtimeapiset.h)
Gets the current unbiased interrupt-time count, in units of 100 nanoseconds. The unbiased interrupt-time count does not include time the system spends in sleep or hibernation.
BOOL QueryUnbiasedInterruptTime( PULONGLONG UnbiasedTime );
If the function succeeds, the return value is nonzero. If the function fails because it is called with a null parameter, the return value is zero.
The interrupt-time count begins at zero when the system starts and is incremented at each clock interrupt by the length of a clock tick. The exact length of a clock tick depends on underlying hardware and can vary between systems.
The interrupt-time count retrieved by the QueryUnbiasedInterruptTime function reflects only the time that the system is in the working state. Therefore, the interrupt-time count is not "biased" by time the system spends in sleep or hibernation. The system uses biased interrupt time for some operations, such as ensuring that relative timers that would have expired during sleep expire immediately upon waking.
Unlike system time, the interrupt-time count is not subject to adjustments by users or the Windows time service. Applications can use the interrupt-time count to measure finer durations than are possible with system time. Applications that require greater precision than the interrupt-time count should use a high-resolution timer. Use the QueryPerformanceFrequency function to retrieve the frequency of the high-resolution timer and the QueryPerformanceCounter function to retrieve the counter's value.
The timer resolution set by the timeBeginPeriod and timeEndPeriod functions affects the resolution of the QueryUnbiasedInterruptTime function. However, increasing the timer resolution is not recommended because it can reduce overall system performance and increase system power consumption by preventing the processor from entering power-saving states. Instead, applications should use a high-resolution timer.
|Minimum supported client||Windows 7, Windows 8 [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2008 R2 [desktop apps | UWP apps]|
|Header||realtimeapiset.h (include Windows.h)|