Class Timer
Represents an operator that generates an observable sequence that periodically produces a value after the specified initial relative due time has elapsed.
Timer
can either generate a single value, if Period is not specified, or an infinite sequence of values emitted periodically. The first value of Timer
is emitted after the specified DueTime.
public class Timer : Source<long>
- Inheritance
-
Timer
- Inherited Members
Properties
DueTime
Gets or sets the relative time at which to produce the first value. If this value is less than or equal to Zero, the timer will fire as soon as possible.
public TimeSpan DueTime { get; set; }
Property Value
Period
Gets or sets the period to produce subsequent values. If this value is not specified or equal to Zero the timer will only fire once.
public TimeSpan? Period { get; set; }
Property Value
Methods
Generate()
Generates an observable sequence that periodically produces a value after the specified initial relative due time has elapsed.
public override IObservable<long> Generate()
Returns
- IObservable<long>
An observable sequence of integer values counting how many times the timer has fired.