Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@steeringwaves/stopwatch

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@steeringwaves/stopwatch

stopwatch library using process.hrtime

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
0
Created
Source

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);

Keywords

timers

FAQs

Package last updated on 01 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts