🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

set-harmonic-interval

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

set-harmonic-interval

Works similar to `setInterval`, but calls all callbacks scheduled using `setHarmonicInterval` all at once, which have same delay in milliseconds.

1.0.1
latest
Source
npm
Version published
Weekly downloads
2.1M
7.23%
Maintainers
1
Weekly downloads
 
Created
Source

set-harmonic-interval

Works similar to setInterval, but calls all callbacks scheduled using setHarmonicInterval all at once, which have same delay in milliseconds.

Install

npm install set-harmonic-interval

Usage

In below example 1 and 2 will always be printed together every second.

const { setHarmonicInterval, clearHarmonicInterval } = require('set-harmonic-interval');

setHarmonicInterval(() => console.log(1), 1000);
setTimeout(() => {
  setHarmonicInterval(() => console.log(2), 1000);
}, 500);

License

Unlicense — public domain.

FAQs

Package last updated on 23 Oct 2019

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