Interface IClockTimer
Registration for a timer created from a clock's timer registration API (BCL "now" subset or full NodaTime-capable clock).
public interface IClockTimer : IDisposable, IAsyncDisposable
- Inherited Members
Properties
- CallbacksProcessing
Returns whether there are currently callbacks being processed for this timer registration.
- Enabled
Gets or sets the enabled state of this timer registration. When this is set to
false, the State will be set to Disabled and no further callbacks will be made. Changing this totruewill cause the timer registration to be re-enabled which has the effect of resetting and restarting the timer.
- Id
A unique identifier for this timer registration instance.
- IsActive
Returns whether this timer registration is currently active. This will return
falseif the registration has been cancelled, if all the callbacks have completed, or if the timer registration has been disposed. Otherwise, this will returntrue, even if State is Disabled.
- IsCancelled
Indicates whether the timer has been cancelled.
- IsLocalTimeRepresentation
Returns whether the properties on this registration are based on local time or UTC time. Timers by default are based on UTC time, but can be configured to use local time instead using the LocalTimeRepresentation timer option during registration.
- IsRepeating
Returns whether this is a repeating timer registration or not.
- IsTimeOfDay
Returns whether this is a time-of-day clock registration or a time-interval clock registration.
- RegisteredInstant
Gets the instant (UTC) at which this timer was registered (NodaTime stack).
- RegisteredTime
Gets the time (UTC or local per registration options) at which this timer was registered.
- State
Returns the current state of this timer registration.
Methods
- Cancel()
Cancels this timer registration. When this is called, the State will be set to Cancelled and IsActive will be set to
false. No further callbacks will be made, and the timer can not be restarted.