The KeQueryPerformanceCounter routine retrieves the current value and frequency of the performance counter.
Use KeQueryPerformanceCounter to acquire high resolution (<1us) time stamps for time interval measurements.
- PerformanceFrequency [out, optional]
A pointer to a variable to which KeQueryPerformanceCounter writes the performance counter frequency, in ticks per second. This parameter is optional and can be NULL if the caller does not need the counter frequency value.
KeQueryPerformanceCounter returns the performance counter value in units of ticks.
KeQueryPerformanceCounter returns a 64-bit integer that represents the current value of a high-resolution monotonically nondecreasing counter.
To obtain the frequency of the performance counter, specify a non-NULL pointer value for the PerformanceFrequency parameter. The frequency of the performance counter is fixed at system boot and is consistent across all processors. Therefore, a driver can cache the frequency of the performance counter during initialization.
For more info about this function and its usage, see Acquiring high-resolution time stamps.
|Available starting with Windows 2000.|