Interface ITimer
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
Interval
Gets or sets the interval between initiating the Tick event.
TimeSpan Interval { get; set; }
Property Value
IsRunning
Gets a value indicating whether the timer is currently running.
bool IsRunning { get; }
Property Value
Methods
Start()
Starts the timer.
void Start()
Start(int)
Starts the timer after the given dueTime in milliseconds.
void Start(int dueTime)
Parameters
Start(TimeSpan)
Starts the timer after the given dueTime.
void Start(TimeSpan dueTime)
Parameters
Stop()
Stops the timer.
void Stop()
Events
Tick
Occurs when the timer ticks over the specified Interval.
event EventHandler<object> Tick