Uptime

Improve this doc

This plugin return the device uptime, without sleep time.

Repo: https://github.com/s1lviu/cordova-plugin-uptime

Installation

  1. Install the Cordova and Ionic Native plugins:
    $ ''
    $ npm install --save @ionic-native/uptime
    
  2. Add this plugin to your app's module

Supported platforms

Usage

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

constructor(private uptime: Uptime) { }

...

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

Instance Members

getUptime()

This function return system uptime

Returns: Promise<string> Returns a promise that return the uptime in milliseconds

API

Native

General