1.0.0 • Published 4 years ago

react-native-device-uptime v1.0.0

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

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