public abstract class TimerTask : IDisposable
The TimerTask type exposes the following members.
The duration in milliseconds of the timer.
The TimerMode specified when the timer is created Start(IContext, TimerCallback, TimerMode, Int64, Object)
A reference to a user userState object. Passed in with the timer callback invocation.
Releases all resources used by the TimerTask
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.)
Creates a shallow copy of the current Object.(Inherited from Object.)
Factory method of TimerTasks. A TimerTask allows applications to execute a user-defined delegate in the context of a given IContext thread. The timer duration is subject to the timer resolution specified by the context property 'TimerResolutionInMsecs', up to the nearest timer resolution interval. For example, if the context timer resolution is 50 ms, and a timer is started with a duration of 60 ms, then the timer duration is rounded up to 100 ms (2 ticks), and then one further tick is added for a total timer duration of 150 ms. This extra tick accounts for the fact that the current tick might be just about to advance when the timer is started. Thus, the actual timeout in this example is approximately in the range of 100 ms to 150 ms.
The timer callback delegate is invoked in the context of the context thread. The timer durations are approximate; the actual duration can be affected by the processing time spent in other callbacks by the context thread, such as for session or flowEvent events and received messages.
Note: disposing the corresponding context (IContext) or any of its contained context timers (TimerTask), sessions (ISession) or flows (IFlow) must not be performed from within the registered userCallbackDelegate.
This timer service should only be used for applications that require a coarse timer service (for example, a guard timer, or other timer uses that do not require a highly accurate timer service).When a one-shot timer expires, the timer is automatically cancelled. When a repeat timer expires, the timer is automatically rescheduled for the same duration, and continues to run until stopped using Dispose.
Note that the invoked timer callback delegate routine is allowed to start and stop timers.
Returns a string that represents the current object.(Inherited from Object.)