Professional Documents
Culture Documents
Creates an Observable that starts emitting after an dueTime and emits ever increasing
numbers after each period of time thereafter.
Parameters
Returns
Observable<number>: An Observable that emits a 0 after the dueTime and ever increasing numbers after
Description
Its like interval, but you can specify when should the emissions start.
timer returns an Observable that emits an infinite sequence of ascending integers, with a constant interval
of time, period of your choosing between those emissions. The first emission happens after the
https://rxjs-dev.firebaseapp.com/api/index/function/timer 1/2
25/08/2020 RxJS - timer
specified dueTime. The initial delay may be a Date. By default, this operator uses
the asyncSchedulerLike to provide a notion of time, but you may pass any SchedulerLike to it.
If period is not specified, the output Observable emits only one value, 0. Otherwise, it emits an infinite
sequence.
Examples
https://rxjs-dev.firebaseapp.com/api/index/function/timer 2/2