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.
Inherited Members
Namespace: Bonsai.Reactive
Assembly: Bonsai.Core.dll
Syntax
public class Timer : Source<long>
Properties
| Improve this Doc View SourceDueTime
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.
Declaration
public TimeSpan DueTime { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Period
Gets or sets the period to produce subsequent values. If this value is equal to Zero the timer will recur as fast as possible.
Declaration
public TimeSpan Period { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Methods
| Improve this Doc View SourceGenerate()
Generates an observable sequence that periodically produces a value after the specified initial relative due time has elapsed.
Declaration
public override IObservable<long> Generate()
Returns
Type | Description |
---|---|
IObservable<Int64> | An observable sequence of integer values counting how many times the timer has fired. |