timeInterval method

Observable<TimeInterval<T>> timeInterval ()

Records the time interval between consecutive values in an observable sequence.

Example

new Observable.just(1)
  .interval(new Duration(seconds: 1))
  .timeInterval()
  .listen(print); // prints TimeInterval{interval: 0:00:01, value: 1}

Implementation

Observable<TimeInterval<T>> timeInterval() =>
    transform(new TimeIntervalStreamTransformer<T>());