delay
operator delays the emissions of values of observable.
you can pass a delay time (millisecond), or a Date
to indicate delay until that moment
import { interval } from 'rxjs';
import { delay, take } from 'rxjs/operators';
const source$ = interval(1500).pipe(take(10));
const result$ = source$.pipe(delay(1000)); // each click emitted after 1 second
Date
import { of } from 'rxjs';
import { delay } from 'rxjs/operators';
const source$ = of(1);
var date = new Date();
date.setSeconds(date.getSeconds() + 5); // now + 5 second
const result$ = source$.pipe(delay(date));
Official Doc: rxjs.delay