#ifndef _NTEXAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)
/**
* The NtQueryTimerResolution routine retrieves the range and current value of the system interrupt timer.
*
* \param MaximumTime The maximum timer resolution, in 100-nanosecond units.
* \param MinimumTime The minimum timer resolution, in 100-nanosecond units.
* \param CurrentTime The current timer resolution, in 100-nanosecond units.
* \return NTSTATUS Successful or errant status.
*/
_Kernel_entry_
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQueryTimerResolution(
_Out_ PULONG MaximumTime,
_Out_ PULONG MinimumTime,
_Out_ PULONG CurrentTime
);
View code on GitHub#ifndef _NTZWAPI_H
_Kernel_entry_
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwQueryTimerResolution(
_Out_ PULONG MaximumTime,
_Out_ PULONG MinimumTime,
_Out_ PULONG CurrentTime
);
View code on GitHubRetrieves the range of supported system timer resolutions and the current resolution. All values are intervals between timer ticks in 100-nanosecond units, so a smaller value means a finer resolution.
MaximumTime - a pointer to a variable that receives the longest supported interval, i.e., the coarsest resolution. This value is typically 156,250 (15.625 ms).MinimumTime - a pointer to a variable that receives the shortest supported interval, i.e., the finest resolution. This value is typically 5,000 (0.5 ms).CurrentTime - a pointer to a variable that receives the current interval. This is the finest resolution among active requests from processes (see NtSetTimerResolution) and drivers (see ExSetTimerResolution), or MaximumTime if there are no requests.This functionality is not exposed in Win32 API.
Function NtQueryTimerResolution returns resolution of system Timer in context of calling process. See also description of NtSetTimerResolution.
Means highest possible delay (in 100-ns units) between timer events.
Means lowest possible delay (in 100-ns units) between timer events.
Current timer resolution, in 100-ns units.