Class RestartingTimer
public class RestartingTimer : IDisposable
- Inheritance
-
RestartingTimer
- Implements
- Inherited Members
- Extension Methods
Constructors
RestartingTimer(TimeSpan, Action)
Creates a new timer with the specified timespan delay and callback
public RestartingTimer(TimeSpan timespan, Action callback)
Parameters
timespanTimeSpanTime to delay before invoking callback
callbackActionAction to execute when timer completes
RestartingTimer(uint, Action)
Creates a new timer with the specified millisecond delay and callback
public RestartingTimer(uint ms, Action callback)
Parameters
msuintMilliseconds to delay before invoking callback
callbackActionAction to execute when timer completes
Fields
disposed
protected bool disposed
Field Value
Properties
IsRunning
Is actually running
public bool IsRunning { get; protected set; }
Property Value
Methods
Dispose()
Disposes the timer and releases resources
public void Dispose()
Kick()
Starts the timer if not running or restarts it if already running, but only if the timer is active
public void Kick()
Restart()
Restarts the timer by stopping it and starting it again
public void Restart()
Start()
Starts the timer
protected void Start()
Stop()
Stops the timer
public void Stop()