# native-idle-time

> Cross platform addon to get the user idle time.

Latest version **1.0.3** (published 2018-05-09) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install native-idle-time
pnpm add native-idle-time
yarn add native-idle-time
bun add native-idle-time
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2018-05-09 |
| First published | 2018-04-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 1 |
| Author | Schlameel |
| Maintainers | schlameel |
| Keywords | idle, native, windows, mac, linux |

## Links

- npm: https://www.npmjs.com/package/native-idle-time
- Repository: https://github.com/schlameel/native-idle-time
- Issues: https://github.com/schlameel/native-idle-time/issues
- npm.io page: https://npm.io/package/native-idle-time

## Dependencies (2)

- [nan](https://npm.io/package/nan.md) ^2.10.0
- [node-pre-gyp](https://npm.io/package/node-pre-gyp.md) ^0.10.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2018-05-09
- 1.0.2 — 2018-04-13

## README

# native-idle-time
#### Cross platform NodeJS addon to get user idle time.

native-idle-time queries the native windowing system (Windows, X, macOS) for
the user's idle time, providing the number of milliseconds the user has been
idle.  The idle time is the same that is used to launch screensavers.

## Install
```bash
npm install native-idle-time
```

## Usage
```javascript
const idleTime = require('native-idle-time')

setTimeout(() => {
  var millis = idleTime.getMillis()
  console.log(`User idle time: ${millis}ms`)
}, 1000)
```

## License
[MIT](https://opensource.org/licenses/MIT)

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