npm.io
1.0.0 • Published 6 years ago

react-native-device-uptime

Licence
MIT
Version
1.0.0
Deps
0
Size
800 kB
Vulns
0
Weekly
0
Stars
4

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 property.

On Android, it uses the elapsedRealtime method.

Installation

npm install react-native-device-uptime

Usage

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

// ...

const uptime = await DeviceUptime.getUptime();

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Keywords