TpSetTimer - NtDoc

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

// winbase:SetThreadpoolTimer
/**
 * Sets the due time and periodic interval for the specified timer object.
 *
 * \param[in,out] Timer A pointer to a TP_TIMER structure that defines the timer object.
 * \param[in] DueTime A pointer to a FILETIME-based value that specifies when the timer expires.
 * \param[in] Period The period, in milliseconds, for periodic timer callbacks.
 * \param[in] WindowLength The maximum amount of time, in milliseconds, that can elapse before the timer callback is invoked.
 * \return None.
 * \sa https://learn.microsoft.com/en-us/windows/win32/api/threadpoolapiset/nf-threadpoolapiset-setthreadpooltimer
 */
NTSYSAPI
VOID
NTAPI
TpSetTimer(
    _Inout_ PTP_TIMER Timer,
    _In_opt_ PLARGE_INTEGER DueTime,
    _In_ ULONG Period,
    _In_opt_ ULONG WindowLength
    );

#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

SetThreadpoolTimer maps directly to this function.

See also