The KeQueryTickCount routine maintains a count of the interval timer interrupts that have occurred since the system was booted.
void KeQueryTickCount( CurrentCount );
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.
|Windows version||Available starting with Windows 2000.|
|Header||ntddk.h (include Wdm.h, Ntddk.h, Ntifs.h)|