New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-uptime

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-uptime - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

www/Uptime.js

6

package.json
{
"name": "cordova-plugin-uptime",
"version": "0.1.1",
"description": "This plugin return the time spent in milliseconds since boot (uptime).",
"version": "0.1.2",
"description": "A Cordova plugin to retrieve the system uptime in milliseconds since boot.",
"cordova": {

@@ -30,3 +30,3 @@ "id": "cordova-plugin-uptime",

"author": "Silviu Stroe",
"license": "ISC",
"license": "MIT",
"bugs": {

@@ -33,0 +33,0 @@ "url": "https://github.com/s1lviu/cordova-plugin-uptime/issues"

@@ -1,12 +0,10 @@

# cordova-plugin-uptime
This plugin provides the time spent in milliseconds since boot (uptime).
This plugin provides the system uptime in milliseconds since boot, allowing developers to track how long a device has been running. This can be particularly useful for monitoring, diagnostics, or adding uptime information within an application.
## Installation
```
```bash
$ ionic cordova plugin add cordova-plugin-uptime
$ npm install --save @ionic-native/uptime
```

@@ -16,4 +14,4 @@

- Android
- iOS
- Android
- iOS

@@ -24,13 +22,12 @@ ## Usage

```
import { Uptime } from '@ionic-native/uptime';
constructor(private uptime: Uptime) { }
...
this.uptime.getUptime(includeDeepSleep)
.then((uptime) => console.log(uptime))
.catch((error) => console.log(error));
```typescript
import { Uptime } from '@ionic-native/uptime';
constructor(private uptime: Uptime) { }
// ...
this.uptime.getUptime(includeDeepSleep)
.then((uptime) => console.log('Uptime (ms): ', uptime))
.catch((error) => console.log('Error: ', error));
```

@@ -40,3 +37,3 @@

```
```javascript
Uptime.getUptime(includeDeepSleep,

@@ -47,11 +44,19 @@ function(uptime) {

function(err) {
console.log(err);
console.log('Error: ', err);
}
);
```
The `includeDeepSleep` is a boolean parameter. If it's set to true, the returned uptime will include the total uptime (including device sleeping time), otherwise, will be the up time, considering clock stops when system enters [deep sleep](https://developer.android.com/reference/android/os/SystemClock.html#uptimeMillis%28%29) (CPU off, display dark, device waiting for external input), but is not affected by clock scaling, idle, or other power saving mechanisms.
The `includeDeepSleep` is a boolean parameter. If set to true, the returned uptime includes the total uptime (including device sleeping time). Otherwise, it will be the uptime considering clock stops when the system enters deep sleep (CPU off, display dark, device waiting for external input), but is not affected by clock scaling, idle, or other power-saving mechanisms.
## Contributing
If you would like to contribute to this plugin, please feel free to submit a pull request or open an issue on our [GitHub repository](https://github.com/s1lviu/cordova-plugin-uptime).
## Author
This plugin is made with :heart: by [Silviu Stroe](https://silviu-s.com/)
This plugin is made with :heart: by [Silviu Stroe](https://silviu-s.com/)
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc