ThreadPoolTimer.CreatePeriodicTimer Method

Definition

Overloads

CreatePeriodicTimer(TimerElapsedHandler, TimeSpan)

Creates a periodic timer.

CreatePeriodicTimer(TimerElapsedHandler, TimeSpan, TimerDestroyedHandler)

Creates a periodic timer and specifies a method to call after the periodic timer is complete. The periodic timer is complete when the timer has expired without being reactivated, and the final call to handler has finished.

CreatePeriodicTimer(TimerElapsedHandler, TimeSpan)

Creates a periodic timer.

public:
 static ThreadPoolTimer ^ CreatePeriodicTimer(TimerElapsedHandler ^ handler, TimeSpan period);
/// [Windows.Foundation.Metadata.Overload("CreatePeriodicTimer")]
 static ThreadPoolTimer CreatePeriodicTimer(TimerElapsedHandler const& handler, TimeSpan const& period);
[Windows.Foundation.Metadata.Overload("CreatePeriodicTimer")]
public static ThreadPoolTimer CreatePeriodicTimer(TimerElapsedHandler handler, System.TimeSpan period);
function createPeriodicTimer(handler, period)
Public Shared Function CreatePeriodicTimer (handler As TimerElapsedHandler, period As TimeSpan) As ThreadPoolTimer

Parameters

handler
TimerElapsedHandler

The method to call when the timer expires.

period
TimeSpan TimeSpan

The amount of time until the timer expires. The timer reactivates each time the period elapses, until the timer is canceled.

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 periodic timer.

Attributes

See also

Applies to

CreatePeriodicTimer(TimerElapsedHandler, TimeSpan, TimerDestroyedHandler)

Creates a periodic timer and specifies a method to call after the periodic timer is complete. The periodic timer is complete when the timer has expired without being reactivated, and the final call to handler has finished.

public:
 static ThreadPoolTimer ^ CreatePeriodicTimer(TimerElapsedHandler ^ handler, TimeSpan period, TimerDestroyedHandler ^ destroyed);
/// [Windows.Foundation.Metadata.Overload("CreatePeriodicTimerWithCompletion")]
 static ThreadPoolTimer CreatePeriodicTimer(TimerElapsedHandler const& handler, TimeSpan const& period, TimerDestroyedHandler const& destroyed);
[Windows.Foundation.Metadata.Overload("CreatePeriodicTimerWithCompletion")]
public static ThreadPoolTimer CreatePeriodicTimer(TimerElapsedHandler handler, System.TimeSpan period, TimerDestroyedHandler destroyed);
function createPeriodicTimer(handler, period, destroyed)
Public Shared Function CreatePeriodicTimer (handler As TimerElapsedHandler, period As TimeSpan, destroyed As TimerDestroyedHandler) As ThreadPoolTimer

Parameters

handler
TimerElapsedHandler

The method to call when the timer expires.

period
TimeSpan TimeSpan

The amount of time until the timer expires. The timer reactivates each time the period elapses, until the timer is canceled.

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

The method to call after the periodic timer is complete.

Returns

An instance of a periodic timer.

Attributes

See also

Applies to