Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

battery-friendly-timer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

battery-friendly-timer - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

3

lib/BatteryFriendlyTimer.js

@@ -77,5 +77,6 @@ 'use strict';

var now = Date.now();
var interval = { from: now, latest: now, callback: callback, tryDelay: tryDelay };
var interval = { from: now, latest: now, callback: callback, tryDelay: tryDelay, forceDelay: forceDelay };
this.intervals[latestId] = interval;
this.forceIntervals[latestId] = this.win.setInterval(function () {
now = Date.now();
if (now - interval.latest >= interval.forceDelay) {

@@ -82,0 +83,0 @@ callback();

{
"name": "battery-friendly-timer",
"version": "1.0.0",
"version": "1.0.1",
"description": "Mobile applications using `setInterval` to poll a server are a battery hogs. Save battery life by fetching data at the right moment.",

@@ -34,4 +34,5 @@ "files": [

"eslint-plugin-react": "^6.1.2",
"mocha": "^3.0.2"
"mocha": "^3.0.2",
"sinon": "^1.17.7"
}
}
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