Uptime

Contents

This plugin provides the time spent in milliseconds since boot (uptime).

Installation

ionic cordova plugin add cordova-plugin-uptimenpm install @ionic-native/uptime
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEYnpm install @ionic-enterprise/uptime

Supported Platforms

  • Android
  • iOS

Usage

import { Uptime } from '@ionic-native/uptime/ngx';

constructor(private uptime: Uptime) { }

...

this.uptime.getUptime(includeDeepSleep)
  .then(uptime => console.log(uptime))
  .catch(error => console.log(error));