Table of Contents

Struct TimeInterval<T>

Namespace
RxSharp
Assembly
RxSharp.dll

A value tagged with the time elapsed since the previous emission (or since subscription, for the first emission). Produced by TimeInterval<T>(Observable<T>, IScheduler?).

public readonly struct TimeInterval<T> : IEquatable<TimeInterval<T>>

Type Parameters

T

The type of the tagged value.

Implements
IEquatable<TimeInterval<T>>

Remarks

Uses Now rather than reading the system clock directly, matching every other time-based operator in this port, so a future virtual-time scheduler can control it in tests.

Constructors

TimeInterval(T, TimeSpan)

Initializes a new instance of the TimeInterval<T> struct.

public TimeInterval(T value, TimeSpan interval)

Parameters

value T

The emitted value.

interval TimeSpan

The time elapsed since the previous emission, or since subscription for the first.

Properties

Interval

Gets the time elapsed since the previous emission, or since subscription for the first emission.

public TimeSpan Interval { get; }

Property Value

TimeSpan

Value

Gets the emitted value.

public T Value { get; }

Property Value

T

Methods

Equals(TimeInterval<T>)

public bool Equals(TimeInterval<T> other)

Parameters

other TimeInterval<T>

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string