RtlGetInterruptTimePrecise
NTSTATUS __stdcall RtlGetInterruptTimePrecise(INT64 *CurrentQpc){
unsigned __int64 TimeUpdateLock;
unsigned __int64 BaselineInterruptTimeQpc;
unsigned int LowPart;
LARGE_INTEGER PerformanceCounter;
__int64 v6;
while( 1 )
{
TimeUpdateLock = KUSER_SHARED_DATA.TimeUpdateLock;
if( (KUSER_SHARED_DATA.TimeUpdateLock & 1) == 0 )
{
BaselineInterruptTimeQpc = KUSER_SHARED_DATA.BaselineInterruptTimeQpc;
LowPart = KUSER_SHARED_DATA.InterruptTime.LowPart;
PerformanceCounter = KeQueryPerformanceCounter(0i64);
if( KUSER_SHARED_DATA.TimeUpdateLock == TimeUpdateLock )
break;
}
_mm_pause();
}
*CurrentQpc = PerformanceCounter.QuadPart;
if( PerformanceCounter.QuadPart <= BaselineInterruptTimeQpc )
return LowPart;
v6 = PerformanceCounter.QuadPart - BaselineInterruptTimeQpc - 1;
if( KUSER_SHARED_DATA.QpcInterruptTimeIncrementShift )
v6 <<= KUSER_SHARED_DATA.QpcInterruptTimeIncrementShift;
return(((unsigned __int64)v6 * (unsigned __int128)KUSER_SHARED_DATA.QpcInterruptTimeIncrement) >> 64) + LowPart;
}Referenced by:
HalpTimerClockInterrupt
HalpVpptAcknowledgeInterrupt
HalpVpptArmTimer
HalpVpptUpdatePhysicalTimer
HalpWatchdogCheckPreResetNMI
HalpWatchdogDelayExpiration
KeClockInterruptNotify
KeGetNextClockTickDuration
KePrepareClockTimerForIdle
KeQueryInterruptTimePrecise
KeQueryWakeSource
KeSetForceIdle
KeSetTimer2
KiCheckAndRearmForceIdle
KiCheckWaitNext
KiExpireTimer2
KiResetForceIdle
KiResumeClockTimer
KiSetClockIntervalToMinimumRequested
PopCalculateCsSummary
PopFxIdleComponent
PopFxResidentTimeoutRoutine
PopIdleWakeNotifyDevicesActive
PopIdleWakeNotifyIdleResiliencyState
PopIdleWakeNotifyModernStandbyExit
PopSetModernStandbyTransitionReason
PopSleepstudyInitialize
PpmCheckStart
PpmEventTracePreVetoAccounting
PpmIdleCsVetoAccountingUpdateBlock
PpmIdlePrevetoWatchdog
PpmUpdateIdleVeto