Interface ITimer
Defines an interface for a timer to use for performing actions on a tick.
Namespace: MADE.Threading
Assembly: MADE.Threading.dll
Syntax
public interface ITimer
Properties
| Improve this Doc View SourceDueTime
Gets or sets the time before initiating the first Tick event.
Declaration
TimeSpan DueTime { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Interval
Gets or sets the interval between initiating the Tick event.
Declaration
TimeSpan Interval { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
IsRunning
Gets a value indicating whether the timer is currently running.
Declaration
bool IsRunning { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceStart()
Starts the timer.
Declaration
void Start()
Start(Int32)
Starts the timer after the given dueTime
in milliseconds.
Declaration
void Start(int dueTime)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | dueTime | The time before initiating the first Tick event in milliseconds. |
Start(TimeSpan)
Starts the timer after the given dueTime
.
Declaration
void Start(TimeSpan dueTime)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | dueTime | The time before initiating the first Tick event. |
Stop()
Stops the timer.
Declaration
void Stop()
Events
| Improve this Doc View SourceTick
Occurs when the timer ticks over the specified Interval.
Declaration
event EventHandler<object> Tick
Event Type
Type | Description |
---|---|
EventHandler<System.Object> |