KeQueryTickCount macro (ntddk.h)

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

Syntax

VOID
KeQueryTickCount (
    _Out_ PLARGE_INTEGER CurrentCount
    );

Parameters

CurrentCount

Pointer to the 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 ntddk.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL Any level

See also

KeQueryInterruptTime

KeQueryPerformanceCounter

KeQueryTimeIncrement