New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

custom-precise-timer

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

custom-precise-timer

This package provides a way to have a precise interval timer for Node.js which is accurate upto 1ms

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

Precise Timer

This package provides a way to have a precise interval timer for Node.js which is accurate upto 1ms.

Install

npm install custom-precise-timer

Usage Example:

const timer = new PreciseTimer(() => {
  console.log('clicker');
}, 2000);

<!-- To Start the timer -->
timer.start()

<!-- To stop the timer -->
timer.stop()
<!-- With options -->


let options = { 
  immediate: true,
  errorCallback: () => {
    console.error('Error')
  }
};

const timer2 = new PreciseTimer(() => {
  console.log('clicker');
}, 2000, options);

<!-- To Start the timer -->
timer2.start()

<!-- To stop the timer -->
timer2.stop() 

Keywords

setTimeout

FAQs

Package last updated on 09 May 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