react-native-device-uptime
v1.0.0
Published
A simple library to tell you your iOS or Android device's uptime
Downloads
2,784
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 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