Thetype exposes the following members.
Default constructor that creates a Disabled timer.
Constructs a timer by parsing a string value.
Constructs a recurring timer that will fire once a day at the specified time offset.
Constructs a recurring timer of the specified type and time offset from the beginning of the implied period.
Returns a disabled timer.
Returns the TimeSpan offet from the beginning of the period when the timer is scheduled to fire.
Returns the timer type.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function.(Inherited from Object.)
Gets the Type of the current instance.(Inherited from Object.)
Determines whether the timer has fired by comparing the current UTC time with the scheduled event time.
Determines if the timer has fired by comparing the current time passed with the next scheduled firing time.
Creates a shallow copy of the current Object.(Inherited from Object.)
Resets the timer to fire at the next scheduled interval after the current UTC time.
Resets the timer to fire at the next scheduled interval after the time passed.
Sets the firing time for the timer.
Starts the timer by computing the next firing time after the current time (UTC).
Starts the timer by computing the next firing time after the time passed.
Renders the timer into a string.(Overrides ObjectToString.)
Attempts to parsefrom a string.
Waits aynchronously for the timer to fire.
This timer is designed to be polled periodically from an application's background thread by calling the HasFired or HasFired(DateTime) methods. These methods will return true if the action associated with the timer is to be performed.
This class works by watching for the transition between a call to HasFired made at a time before the scheduled event and then a subsequent call made when the current time is at or after the scheduled event time. HasFired will return true on the subsequent call if the time is right.
This behavior ensures that scheduled tasks will only be executed once for any recurring schedule, even if the application is restarted.
Asynchronous applications may find it more convienent to call WaitAsync(TimeSpan) to wait for the timer to fire.
The Reset and Reset(DateTime) methods may be used to explicitly reset the timer to fire at the next scheduled time. This may be useful for ensuring that short duration timers are properly reset after an operation that may take longer to complete than the timer interval.
Recurring timers are represented as strings with the format of the string depending on the type of timer. The table below describes these formats:
Disabled timers never fire. Simply place the word Disabled at the beginning of the timer string.
Minute timers fire at the top of every minute. There is no offset. Minute timers are formatted as:
Quarter hour timers are fired four times an hour at the offset from the 15 minute time. Quarter hour timers formatted as:
QuarterHour QuarterHour:MM QuarterHour:MM:SS
Hourly timers are fired once per hour at the offset from the top of the hour. Hourly timers are formatted as:
Hourly Hourly:MM Hourly:MM:SS
Daily timers are fired once per day at the specified time of day. Daily timers are formatted as:
Daily Daily:HH:MM Daily:HH:MM:SS
Interval timers are fired on a regular interval that is not not tied to a specific period. Interval timers are formatted as: