---
name: "RtlCreateTimer"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/RtlCreateTimer"
---

# RtlCreateTimer(3w)

## NAME

**RtlCreateTimer** (NTDLL.@)

## SYNOPSIS

NTSTATUS RtlCreateTimer\
  (\
   PHANDLE                     *NewTimer*,\
   HANDLE                      *TimerQueue*,\
   RTL\_WAITORTIMERCALLBACKFUNC *Callback*,\
   PVOID                       *Parameter*,\
   DWORD                       *DueTime*,\
   DWORD                       *Period*,\
   ULONG                       *Flags*\
  )

## DESCRIPTION

Creates a new timer associated with the given queue.

## PARAMS

*NewTimer* **\[Out\]**  The newly created timer.

*TimerQueue* **\[In\]**  The queue to hold the timer.

*Callback* **\[In\]**  The callback to fire.

*Parameter* **\[In\]**  The argument for the callback.

*DueTime* **\[In\]**  The delay, in milliseconds, before first firing the timer.

*Period* **\[In\]**  The period, in milliseconds, at which to fire the timer after the first callback. If zero, the timer will only fire once. It still needs to be deleted with RtlDeleteTimer.

*Flags* **\[In\]**  *Flags* controling the execution of the callback. In addition to the **WT\_**\* thread pool flags (see RtlQueueWorkItem), **WT\_EXECUTEINTIMERTHREAD** and **WT\_EXECUTEONLYONCE** are supported.

## RETURNS

**Success:** **STATUS\_SUCCESS**.

**Failure:** Any **NTSTATUS** code.

## IMPLEMENTATION

Declared in **"winternl.h"**.

Implemented in **"dlls/ntdll/threadpool.c"**.

Debug channel **"threadpool"**.
