JSPM

try-thread-sleep

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 524
  • Score
    100M100P100Q109264F
  • License MIT

Use thread-sleep if native compilation succeeded, otherwise it's a noop

Package Exports

  • try-thread-sleep

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (try-thread-sleep) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

try-thread-sleep

Use thread-sleep if native compilation succeeded, otherwise it's a noop

Build Status Dependency Status NPM version

Installation

npm install try-thread-sleep

Usage

var sleep = require('try-thread-sleep');

if (!sleep.native) {
  console.warn('native thread-sleep was not available');
}

// this next line will take roughly 1 second if native compilation succeeded,
// otherwise it will be almost instant.
sleep(1000);

License

MIT