TimerItem Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines a timer item to set up a timer. When the timer expires, a supplied callback is called. The timer item needs access to a TimerWheel in which the timer item is managed.
public ref class TimerItem
public class TimerItem
type TimerItem = class
Public Class TimerItem
- Inheritance
-
TimerItem
Constructors
TimerItem(TimerWheel, TimeSpan) |
Initializes a new instance of the TimerItem class. |
Properties
IsStarted |
Gets the current timer item status. |
RemainingTime |
Gets the remaining time span for TimerItem before the TimerItem expires. |
TimerSpan |
Gets the timer span value. |
Wheel |
Gets the timer wheel. |
Methods
Reset() |
Resets the timer by rescheduling the item for a period of time equal to the original timer span. |
Reset(TimeSpan) |
Resets the timer by rescheduling the item for the new period of time specified. |
Start() |
Enables the timer item by setting the expiry time and adding the item to the queue. |
Stop() |
Disables the timer by removing the item from the timer queue and by resetting the expiry time. |
Events
Expired |
Raised when the item expires. |