You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

usleep

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

usleep

Add sleep functions: sleep(), msleep(), usleep()


Version published
Weekly downloads
401
increased by35.47%
Maintainers
1
Install size
2.80 kB
Created
Weekly downloads
 

Readme

Source

usleep

  • sleep takes a number of seconds and the process will sleep for the given amount of time.
  • msleep takes a number of milliseconds and the process will sleep for the given amount of time.
  • usleep takes a number of microseconds and the process will sleep for the given amount of time.

Usage

Example for CommonJS / Node.js

let {msleep} = require('usleep');
msleep(300).then(() => {
  console.info('It slept for 300 milliseconds');
});

Example for Babel / TypeScript

import {sleep} from 'usleep';
async function foo () {
  await sleep(2);
  console.info('It slept for 2 seconds');
}

Installation

To use the library, install it through npm

npm install --save usleep

API

sleep(int seconds)
msleep(int milliseconds)
usleep(int microseconds)

Keywords

FAQs

Package last updated on 15 Jun 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc