Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@ddlab/timer

ddukstas12ISC1.1.3TypeScript support: included

simple timer utility class

timer, interval, setTimeout, loop

readme

Timer

Simple timer utility class with fluent API

Usage

import {timer} from '@ddlab/timer';
const tickInterval = 1000;
const timer = new Timer(tickInterval);

timer
    .subscribe(elapsedTime => console.log(elapsedTime))
    .start();

timer.stop();