interval method

Observable<T> interval (Duration duration)

Creates an Observable that emits each item in the Stream after a given duration.

Example

new Observable.fromIterable([1, 2, 3])
  .interval(new Duration(seconds: 1))
  .listen((i) => print("$i sec"); // prints 1 sec, 2 sec, 3 sec

Implementation

Observable<T> interval(Duration duration) =>
    transform(new IntervalStreamTransformer<T>(duration));