Table of Contents

Class Timer

Namespace
Bonsai.Shaders
Assembly
Bonsai.Shaders.dll

Represents an operator that generates an observable sequence that periodically produces a value after the specified initial relative due time has elapsed, using the render loop timing.

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

TimeSpan

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

TimeSpan?

Methods

Generate()

Generates an observable sequence that periodically produces a value after the specified initial relative due time has elapsed, using the render loop timing.

public override IObservable<long> Generate()

Returns

IObservable<long>

An observable sequence of integer values counting how many times the timer has fired.

Generate(IObservable<FrameEvent>)

Generates an observable sequence that periodically produces a value after the specified initial relative due time has elapsed, using the timing from the specified sequence of frame events.

public IObservable<long> Generate(IObservable<FrameEvent> source)

Parameters

source IObservable<FrameEvent>

The sequence of frame events controlling the timing of the timer.

Returns

IObservable<long>

An observable sequence of integer values counting how many times the timer has fired.

Generate(IObservable<TimeStep>)

Generates an observable sequence that periodically produces a value after the specified initial relative due time has elapsed, using the timing from the specified sequence of time steps.

public IObservable<long> Generate(IObservable<TimeStep> source)

Parameters

source IObservable<TimeStep>

The sequence of time steps controlling the timing of the timer.

Returns

IObservable<long>

An observable sequence of integer values counting how many times the timer has fired.

Generate(IObservable<double>)

Generates an observable sequence that periodically produces a value after the specified initial relative due time has elapsed, using the timing from the specified sequence of time steps in seconds.

public IObservable<long> Generate(IObservable<double> source)

Parameters

source IObservable<double>

The sequence of time steps, in seconds, controlling the timing of the timer.

Returns

IObservable<long>

An observable sequence of integer values counting how many times the timer has fired.