Table of Contents

Interface ITimerFactory

Namespace
Cratis.Timers
Assembly
Cratis.Fundamentals.dll

Defines a factory for ITimer.

public interface ITimerFactory
Extension Methods

Methods

Create(TimerCallback, int, int, object?)

Create a new timer.

ITimer Create(TimerCallback callback, int dueTime, int period, object? state = null)

Parameters

callback TimerCallback

A System.Threading.TimerCallback delegate representing a method to be executed.

dueTime int

The amount of time to delay before callback is invoked, in milliseconds. Specify System.Threading.Timeout.Infinite to prevent the timer from starting. Specify zero (0) to start the timer immediately.

period int

The time interval between invocations of callback, in milliseconds. Specify System.Threading.Timeout.Infinite to disable periodic signaling.

state object

Optionally an object containing information to be used by the callback method, or null.

Returns

ITimer

A new ITimer.