KeQueryTickCount macro (wdm.h)

The KeQueryTickCount routine maintains a count of the interval timer interrupts that have occurred since the system was booted.

Syntax

void KeQueryTickCount(
  [out]  CurrentCount
);

Parameters

[out] CurrentCount

Pointer to the LARGE_INTEGER tick count value on return from KeQueryTickCount.

Return value

None

Remarks

The TickCount value increases by one at each interval timer interrupt while the system is running.

The preferred method of determining elapsed time is by using TickCount for relative timing and time stamps.

To determine the absolute elapsed time multiply the returned TickCount by the KeQueryTimeIncrement return value using compiler support for 64-bit integer operations.

You should not make any assumptions about the length of a tick, because it might vary depending on hardware and other considerations.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 2000.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL Any level

See also

KeQueryInterruptTime

KeQueryPerformanceCounter

KeQueryTimeIncrement