Table of Contents

Class TimeIntervalOperator

Namespace
RxSharp.Operators
Assembly
RxSharp.dll

Extension methods implementing the timeInterval operator.

public static class TimeIntervalOperator
Inheritance
System.Object
TimeIntervalOperator

Methods

TimeInterval<T>(Observable<T>, IScheduler?)

Tags each value emitted by source with the time elapsed since the previous emission (or since subscription, for the first emission), using scheduler's notion of "now". Errors and completion are passed through unchanged.

public static Observable<TimeInterval<T>> TimeInterval<T>(this Observable<T> source, IScheduler? scheduler = null)

Parameters

source Observable<T>

The source sequence.

scheduler IScheduler

The scheduler whose Now is used to time each emission; defaults to Instance when null.

Returns

Observable<TimeInterval<T>>

An observable of TimeInterval<T> values pairing each source value with the time elapsed since the previous one.

Type Parameters

T

The type of values emitted by source.