HalpTimerReadTimerPairWithLatencyLimit
UINT64 __fastcall HalpTimerReadTimerPairWithLatencyLimit(
unsigned int a1,
__int64 a2,
__int64 a3,
LARGE_INTEGER *a4,
LARGE_INTEGER *a5){
unsigned __int64 v7;
unsigned __int64 v9;
void *v10;
void *v11;
void *v12;
__int64 v13;
LARGE_INTEGER PerformanceCounter;
void *v15;
void *v16;
void *v17;
__int64 v18;
LARGE_INTEGER v19;
unsigned __int64 v20;
UINT64 result;
v7 = a1;
do
{
HalpProcessorFence();
v9 = __rdtsc();
HalpProcessorFence();
if( a2 == HalpPerformanceCounter && HalpTimerFrequenciesMeasured )
{
PerformanceCounter = KeQueryPerformanceCounter(0i64);
}
else
{
HalpTimerGetInternalData((KDPC *)a2, v10, v11, v12);
PerformanceCounter.QuadPart = (*(__int64(__fastcall **)(__int64))(a2 + 112))(v13);
}
*a4 = PerformanceCounter;
HalpProcessorFence();
if( a3 == HalpPerformanceCounter && HalpTimerFrequenciesMeasured )
{
v19 = KeQueryPerformanceCounter(0i64);
}
else
{
HalpTimerGetInternalData((KDPC *)a3, v15, v16, v17);
v19.QuadPart = (*(__int64(__fastcall **)(__int64))(a3 + 112))(v18);
}
*a5 = v19;
HalpProcessorFence();
v20 = __rdtsc();
result = HalpProcessorFence();
}
while( v20 - v9 > v7 );
return result;
}Referenced by:
HalpTimerMeasureFrequencies
HalpTimerMeasureProcessorsWorker