interval

import { interval } from '@hullo/core'

Returns an Observable that emits current time (returned by Date.now) with a frequency provided as first and only argument. First argument should be a number and will be interpreted as the amount of time that should separate each message.

import { interval, map } from '@hullo/core';
interval(1000).pipe(
map(t => new Date(t).toString())
).subscribe({
next(time) { console.log('Current time:', time); }
});