TpSetTimerEx - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTTP_H
#if (PHNT_VERSION >= PHNT_WINDOWS_8)

// winbase:SetThreadpoolTimerEx
/**
 * TpSetTimerEx contract.
 *
 * \param Timer Timer object to update.
 * \param DueTime Native-time due value, or NULL to disarm.
 * \param Period Period in milliseconds.
 * \param WindowLength Coalescing window in milliseconds.
 * \remarks DueTime NULL disarms; negative values are relative 100-nanosecond intervals and nonnegative values are absolute time. 
 * Period and WindowLength are milliseconds. The Ex return is a 32-bit LOGICAL cancellation result for the prior timer, not NTSTATUS or success of the newly requested schedule. 
 * A newly armed timer can return FALSE; replacing/disarming an outstanding timer can return TRUE. Already queued/executing callbacks still require drainage.
 */
NTSYSAPI
LOGICAL
NTAPI
TpSetTimerEx(
    _Inout_ PTP_TIMER Timer,
    _In_opt_ PLARGE_INTEGER DueTime,
    _In_ ULONG Period,
    _In_ ULONG WindowLength
    );

#endif
#endif

View code on GitHub

NtDoc

Sets the timer object, replacing the previous timer, if any. A worker thread calls the timer object's callback after the specified timeout expires.

Related Win32 API

SetThreadpoolTimerEx maps directly to this function.

See also