TimerTask Methods

Solclient

TimerTask Methods
version: 7.2.1.27

The TimerTask type exposes the following members.

Methods
  Name Description
Public method Dispose
Public method Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected method Finalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public method GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method Static member Start
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.

Public method ToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
See Also