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

puresleepjs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

puresleepjs

Sleeping in pure javascript, no c++ binding, only exec and loops

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

PureSleepJS

Sleep for javascript/nodejs in pure javascript with while loops and exec.

Get it at npm, these example are the only api that exist.

Example:

const PureSleepJS = require("puresleepjs");

var second = 1;

var millisecond = 500;

PureSleepJS.pingSleep(second);

PureSleepJS.nativeSleep(second);

PureSleepJS.pythonSleep(second);

PureSleepJS.whileSleep(millisecond); // Do not do this unless you want 100% on your CPU or you need millisecond support, but cannot use async or promises

(async function(){

    await PureSleepJS.promiseSleep(millisecond); // use this if possible, but if you cannot use async or promises and you need millisecond, use the while sleep

})();

Keywords

Sleep

FAQs

Package last updated on 16 Nov 2021

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