Observable<T>.timer constructor

Observable<T>.timer(T value, Duration duration)

Emits the given value after a specified amount of time.

Example

new Observable.timer("hi", new Duration(minutes: 1))
    .listen((i) => print(i)); // print "hi" after 1 minute

Implementation

factory Observable.timer(T value, Duration duration) =>
    new Observable<T>((new TimerStream<T>(value, duration)));