NtSetTimerResolution - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTEXAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)

/**
 * The NtSetTimerResolution routine sets the system interrupt timer resolution to the specified value.
 *
 * @param DesiredTime The desired timer resolution, in 100-nanosecond units.
 * @param SetResolution If TRUE, the timer resolution is set to the value specified by DesiredTime. If FALSE, the timer resolution is reset to the default value.
 * @param ActualTime The actual timer resolution, in 100-nanosecond units.
 * @return NTSTATUS Successful or errant status.
 */
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetTimerResolution(
    _In_ ULONG DesiredTime,
    _In_ BOOLEAN SetResolution,
    _Out_ PULONG ActualTime
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwSetTimerResolution(
    _In_ ULONG DesiredTime,
    _In_ BOOLEAN SetResolution,
    _Out_ PULONG ActualTime
    );

#endif

View code on GitHub

Function NtSetTimerResolution sets resolution of system Timer in calling process context.

DesiredResolution

Resolution to set. To receive minimum and maximum resolution values, call NtQueryTimerResolution.

SetResolution

If set, system Timer's resolution is set to DesiredResolution value. If no, parameter DesiredResolution is ignored.

CurrentResolution

Pointer to ULONG value receiving current timer's resolution, in 100-ns units.

Documented by

See also