react-native-device-uptime
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i react-native-device-uptime

Weekly Downloads

603

Version

1.0.0

License

MIT

Unpacked Size

819 kB

Total Files

131

Last publish

Collaborators

  • lukerogerson