From 91d22c52117abe171374d56781689c9e80428a33 Mon Sep 17 00:00:00 2001 From: Silviu Bogdan Stroe Date: Fri, 13 Apr 2018 23:01:23 +0300 Subject: [PATCH] feat(uptime): add deep sleep parameter (#2456) * docs(uptime): add cordova installation * feat(uptime): add deep sleep parameter * Update index.ts --- src/@ionic-native/plugins/uptime/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/@ionic-native/plugins/uptime/index.ts b/src/@ionic-native/plugins/uptime/index.ts index 4224f4b57..a2458b78e 100644 --- a/src/@ionic-native/plugins/uptime/index.ts +++ b/src/@ionic-native/plugins/uptime/index.ts @@ -4,17 +4,18 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; /** * @name Uptime * @description - * This plugin return the device uptime, without sleep time. + * This plugin provides the time spent in milliseconds since boot (uptime). * * @usage * ```typescript + * ionic cordova plugin add cordova-plugin-uptime * import { Uptime } from '@ionic-native/uptime'; * * constructor(private uptime: Uptime) { } * * ... * - * this.uptime.getUptime() + * this.uptime.getUptime(includeDeepSleep) * .then(uptime => console.log(uptime)) * .catch(error => console.log(error)); * @@ -31,10 +32,11 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; export class Uptime extends IonicNativePlugin { /** * This function return system uptime + * @param {boolean} includeDeepSleep Set to true to include system deep sleep * @return {Promise} Returns a promise that return the uptime in milliseconds */ @Cordova() - getUptime(): Promise { + getUptime(includeDeepSleep: boolean): Promise { return; } }