# react-native-device-uptime

> A simple library to tell you your iOS or Android device's uptime

Latest version **1.0.0** (published 2020-11-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-device-uptime
pnpm add react-native-device-uptime
yarn add react-native-device-uptime
bun add react-native-device-uptime
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-11-01 |
| First published | 2020-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 800 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Luke Rogerson |
| Maintainers | lukerogerson |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-device-uptime
- Repository: https://github.com/Luke-Rogerson/react-native-device-uptime
- Homepage: https://github.com/Luke-Rogerson/react-native-device-uptime#readme
- Issues: https://github.com/Luke-Rogerson/react-native-device-uptime/issues
- npm.io page: https://npm.io/package/react-native-device-uptime

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-11-01

## README

# react-native-device-uptime

A simple library to tell you your iOS or Android device's uptime (ie. the amount of time the system has been awake since the last time it was restarted).

On iOS, it wraps the [systemUptime](https://developer.apple.com/documentation/foundation/nsprocessinfo/1414553-systemuptime) property.

On Android, it uses the [elapsedRealtime](https://developer.android.com/reference/android/os/SystemClock#elapsedRealtime()) method.

## Installation

```sh
npm install react-native-device-uptime
```

## Usage

```js
import DeviceUptime from "react-native-device-uptime";

// ...

const uptime = await DeviceUptime.getUptime();
```

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT

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