ThreadPoolTimer.CreateTimer ThreadPoolTimer.CreateTimer ThreadPoolTimer.CreateTimer ThreadPoolTimer.CreateTimer Method

Definition

Overloads

CreateTimer(TimerElapsedHandler, TimeSpan) CreateTimer(TimerElapsedHandler, TimeSpan) CreateTimer(TimerElapsedHandler, TimeSpan) CreateTimer(TimerElapsedHandler, TimeSpan)

Creates a single-use timer.

CreateTimer(TimerElapsedHandler, TimeSpan, TimerDestroyedHandler) CreateTimer(TimerElapsedHandler, TimeSpan, TimerDestroyedHandler) CreateTimer(TimerElapsedHandler, TimeSpan, TimerDestroyedHandler) CreateTimer(TimerElapsedHandler, TimeSpan, TimerDestroyedHandler)

Creates a single-use timer and specifies a method to call after the timer is complete. The timer is complete when the timer has expired and the final call to handler has finished.

CreateTimer(TimerElapsedHandler, TimeSpan) CreateTimer(TimerElapsedHandler, TimeSpan) CreateTimer(TimerElapsedHandler, TimeSpan) CreateTimer(TimerElapsedHandler, TimeSpan)

Creates a single-use timer.

public : static ThreadPoolTimer CreateTimer(TimerElapsedHandler handler, TimeSpan delay)
static ThreadPoolTimer CreateTimer(TimerElapsedHandler handler, TimeSpan delay) const;
public static ThreadPoolTimer CreateTimer(TimerElapsedHandler handler, TimeSpan delay)
Public Shared Function CreateTimer(handler As TimerElapsedHandler, delay As TimeSpan) As ThreadPoolTimer

Parameters

handler
TimerElapsedHandler TimerElapsedHandler

The method to call when the timer expires.

delay
TimeSpan TimeSpan

The amount of time until the timer expires.

C++ This amount of time is specified in ticks (100-nanosecond units) using the Windows::Foundation::TimeSpan structure.

JavaScript and C# This amount of time is specified using the System.TimeSpan structure. It can be specified in ticks, or it can be specified in milliseconds, seconds, and so on.

Returns

An instance of a single-use timer.

See also

CreateTimer(TimerElapsedHandler, TimeSpan, TimerDestroyedHandler) CreateTimer(TimerElapsedHandler, TimeSpan, TimerDestroyedHandler) CreateTimer(TimerElapsedHandler, TimeSpan, TimerDestroyedHandler) CreateTimer(TimerElapsedHandler, TimeSpan, TimerDestroyedHandler)

Creates a single-use timer and specifies a method to call after the timer is complete. The timer is complete when the timer has expired and the final call to handler has finished.

public : static ThreadPoolTimer CreateTimer(TimerElapsedHandler handler, TimeSpan delay, TimerDestroyedHandler destroyed)
static ThreadPoolTimer CreateTimer(TimerElapsedHandler handler, TimeSpan delay, TimerDestroyedHandler destroyed) const;
public static ThreadPoolTimer CreateTimer(TimerElapsedHandler handler, TimeSpan delay, TimerDestroyedHandler destroyed)
Public Shared Function CreateTimer(handler As TimerElapsedHandler, delay As TimeSpan, destroyed As TimerDestroyedHandler) As ThreadPoolTimer

Parameters

handler
TimerElapsedHandler TimerElapsedHandler

The method to call when the timer expires.

delay
TimeSpan TimeSpan

The amount of time until the timer expires.

C++ This amount of time is specified in ticks (100-nanosecond units) using the Windows::Foundation::TimeSpan structure.

JavaScript and C# This amount of time is specified using the System.TimeSpan structure. It can be specified in ticks, or it can be specified in milliseconds, seconds, and so on.

destroyed
TimerDestroyedHandler TimerDestroyedHandler

The method to call after the timer is complete.

Returns

An instance of a single-use timer.

See also