timeInterval
Emits an object containing the current value, and the time that has
passed between emitting the current value and the previous value, which is
calculated by using the provided scheduler
's now()
method to retrieve
the current time at each emission, then calculating the difference. The scheduler
defaults to async
, so by default, the interval
will be in
milliseconds.
Parameters
scheduler |
Optional. Default is Scheduler used to get the current time. |
Returns
OperatorFunction<T, TimeInterval<T>>
: Observable that emit infomation about value and interval
Description
Convert an Observable that emits items into one that emits indications of the amount of time elapsed between those emissions.
Examples
Emit inteval between current value with the last value