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
TThe 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
valueTThe emitted value.
intervalTimeSpanThe 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
otherTimeInterval<T>
Returns
- bool
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject?
Returns
- bool
GetHashCode()
public override int GetHashCode()
Returns
- int
ToString()
public override string ToString()
Returns
- string