# try-thread-sleep

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

Latest version **2.0.0** (published 2018-05-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install try-thread-sleep
pnpm add try-thread-sleep
yarn add try-thread-sleep
bun add try-thread-sleep
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-05-10 |
| First published | 2015-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | ForbesLindesay |
| Maintainers | forbeslindesay |

## Links

- npm: https://www.npmjs.com/package/try-thread-sleep
- Repository: https://github.com/ForbesLindesay/try-thread-sleep
- Homepage: https://github.com/ForbesLindesay/try-thread-sleep#readme
- Issues: https://github.com/ForbesLindesay/try-thread-sleep/issues
- npm.io page: https://npm.io/package/try-thread-sleep

## Dependencies (1)

- [thread-sleep](https://npm.io/package/thread-sleep.md) ^2.0.0

## Recent versions

- 2.0.0 (latest) — 2018-05-10
- 1.0.2 — 2017-02-26
- 1.0.1 — 2017-02-26
- 1.0.0 — 2015-01-15

## README

# try-thread-sleep

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

[![Build Status](https://img.shields.io/travis/ForbesLindesay/try-thread-sleep/master.svg)](https://travis-ci.org/ForbesLindesay/try-thread-sleep)
[![Dependency Status](https://img.shields.io/david/ForbesLindesay/try-thread-sleep.svg)](https://david-dm.org/ForbesLindesay/try-thread-sleep)
[![NPM version](https://img.shields.io/npm/v/try-thread-sleep.svg)](https://www.npmjs.org/package/try-thread-sleep)

## Installation

    npm install try-thread-sleep

## Usage

```js
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

---
_Source: https://npm.io/package/try-thread-sleep · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
