Table of Contents

Interface ITimer

Namespace
MADE.Threading
Assembly
MADE.Threading.dll

Defines an interface for a timer to use for performing actions on a tick.

public interface ITimer
Extension Methods

Properties

DueTime

Gets or sets the time before initiating the first Tick event.

TimeSpan DueTime { get; set; }

Property Value

TimeSpan

Interval

Gets or sets the interval between initiating the Tick event.

TimeSpan Interval { get; set; }

Property Value

TimeSpan

IsRunning

Gets a value indicating whether the timer is currently running.

bool IsRunning { get; }

Property Value

bool

Methods

Start()

Starts the timer.

void Start()

Start(int)

Starts the timer after the given dueTime in milliseconds.

void Start(int dueTime)

Parameters

dueTime int

The time before initiating the first Tick event in milliseconds.

Start(TimeSpan)

Starts the timer after the given dueTime.

void Start(TimeSpan dueTime)

Parameters

dueTime TimeSpan

The time before initiating the first Tick event.

Stop()

Stops the timer.

void Stop()

Events

Tick

Occurs when the timer ticks over the specified Interval.

event EventHandler<object> Tick

Event Type

EventHandler<object>