@steeringwaves/stopwatch
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

js-stopwatch

workflow

A node utility to help keep track of time.

Example

const { Stopwatch } = require("@steeringwaves/stopwatch");

const stopwatch = new Stopwatch();
stopwatch.Init(5000);
stopwatch.Start();

stopwatch.on(Stopwatch.EVENTS.EXPIRED, (when) => {
	console.log("expired at", when);
	stopwatch.Restart();
});

setInterval(() => {
	console.log("stopwatch time:", stopwatch.Get());
}, 1000);

Readme

Keywords

Package Sidebar

Install

npm i @steeringwaves/stopwatch

Weekly Downloads

40

Version

1.0.2

License

ISC

Unpacked Size

148 kB

Total Files

40

Last publish

Collaborators

  • lbainbridge
  • devmcclu
  • maxattax
  • 1800alex