Class ScheduledTimer
A timer that fires at a particular time of day.
Implements
Namespace: Codaris.Common
Assembly: Codaris.Common.dll
Syntax
public class ScheduledTimer : IDisposable
Constructors
ScheduledTimer(int, int, int)
Initializes a new instance of the ScheduledTimer class. This timer will trigger at the specified time of day.
public ScheduledTimer(int hour, int minute, int second)
Parameters
Type | Name | Description |
---|---|---|
int | hour | The hour. |
int | minute | The minute. |
int | second | The second. |
See Also
Properties
AutoReset
Gets or sets a value indicating whether this instance should raise the Elapsed event only once (false) or repeatedly (true).
public bool AutoReset { get; set; }
Property Type
bool |
See Also
Enabled
Gets or sets a value indicating whether this ScheduledTimer should raise the Elapsed event.
public bool Enabled { get; set; }
Property Type
bool |
See Also
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
See Also
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
|
See Also
Start()
Starts raising theElapsed event by setting Enabled to true.
public void Start()
See Also
Stop()
Stops raising the SElapsed event by setting Enabled to false.
public void Stop()
See Also
Events
Elapsed
Occurs when timer has elapsed.
public event ElapsedEventHandler Elapsed
Event Type
ElapsedEventHandler |