This package has been deprecated

Author message:

Development of this module has been stopped.

sleep-sync

2.1.3 • Public • Published

sleep sync

NPM version Build status License Code style

Block execution synchronously

Why?

Obviously this is counter to everything we know about not blocking the event loop I wrote this simple wrapper for testing purposes. Sometimes it's useful to simulate the blocking of the event loop, so we can work on how to handle that scenario from outside of Node.

Installation

$ npm install --save sleep-sync

Usage

const sleep = require('sleep-sync')
 
doStuffAsync()
 
sleep(333) // block ALL execution for 333 milliseconds
 
doMoreStuff()

Readme

Keywords

Package Sidebar

Install

npm i sleep-sync

Weekly Downloads

2

Version

2.1.3

License

MIT

Unpacked Size

5.05 kB

Total Files

8

Last publish

Collaborators

  • roryrjb