Skip to content

)} ,System.Reactive.Concurrency.IScheduler)}

Observable.TimeInterval(IObservable) method

Defined in

Type: Observable Namespace: System.Reactive.Linq Assembly: System.Reactive.dll

Applies to

netstandard2.0

Overloads

  • 1. public static IObservable<TimeInterval<TSource>> TimeInterval<TSource>(this IObservable<TSource> source)
  • 2. public static IObservable<TimeInterval<TSource>> TimeInterval<TSource>(this IObservable<TSource> source, IScheduler scheduler)

1. Overload

public static IObservable<TimeInterval<TSource>> TimeInterval<TSource>(this IObservable<TSource> source)

Summary: Records the time interval between consecutive elements in an observable sequence.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableSource sequence to record time intervals for.

Returns: IObservable> -- An observable sequence with time interval information on elements.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.

2. Overload

public static IObservable<TimeInterval<TSource>> TimeInterval<TSource>(this IObservable<TSource> source, IScheduler scheduler)

Summary: Records the time interval between consecutive elements in an observable sequence, using the specified scheduler to compute time intervals.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableSource sequence to record time intervals for.
scheduler[IScheduler](#Scheduler used to compute time intervals.

Returns: IObservable> -- An observable sequence with time interval information on elements.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or scheduler is null.