New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sleep

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sleep - npm Package Compare versions

Comparing version 5.2.2 to 5.2.3

appveyor.yml

2

package.json
{
"name": "sleep",
"version": "5.2.2",
"version": "5.2.3",
"main": "index.js",

@@ -5,0 +5,0 @@ "description": "Add sleep() and usleep() to nodejs",

[![Build Status](https://travis-ci.org/erikdubbelboer/node-sleep.png?branch=master)](https://travis-ci.org/erikdubbelboer/node-sleep)
[![Build status](https://ci.appveyor.com/api/projects/status/09kubqqykjaxdrab?svg=true)](https://ci.appveyor.com/project/erikdubbelboer/node-sleep)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Ferikdubbelboer%2Fnode-sleep.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Ferikdubbelboer%2Fnode-sleep?ref=badge_shield)

@@ -3,0 +4,0 @@

@@ -7,6 +7,10 @@ /* globals describe, it */

function assertApproxEqual(val1, val2) {
var epsilon = 5; // we require accuracy to the nearest N millisecond
var diff = Math.abs(val1 - val2);
// We require accuracy to the nearest N millisecond.
// Windows Sleep is not super accurate (depends on scheduling policy) so use a high value.
var epsilon = 100;
var diff = val1 - val2;
if (diff > epsilon) {
assert.fail(diff, epsilon, 'wait was too short', '>');
assert.fail(diff, epsilon, 'wait was too long');
} else if (diff < -epsilon) {
assert.fail(diff, epsilon, 'wait was too short');
}

@@ -50,3 +54,3 @@ }

it('works for values smaller than a second', function () {
var sleepTime = 30;
var sleepTime = 250;
var start = new Date();

@@ -53,0 +57,0 @@ sleep.usleep(sleepTime);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc