Socket
Socket
Sign inDemoInstall

retimer

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retimer - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

4

package.json
{
"name": "retimer",
"version": "1.0.1",
"version": "1.1.0",
"description": "Reschedulable Timer for your node needs",

@@ -34,5 +34,5 @@ "main": "retimer.js",

"pre-commit": "^1.0.10",
"standard": "^4.5.2",
"standard": "^10.0.0",
"tape": "^4.0.0"
}
}

@@ -8,3 +8,3 @@ 'use strict'

this._started = Date.now()
this._started = getTime()
this._rescheduled = 0

@@ -18,3 +18,3 @@ this._scheduled = timeout

if (that._rescheduled > 0) {
that._scheduled = that._rescheduled - (Date.now() - that._started)
that._scheduled = that._rescheduled - (getTime() - that._started)
that._timer = setTimeout(timerWrapper, that._scheduled)

@@ -29,3 +29,3 @@ that._rescheduled = 0

Retimer.prototype.reschedule = function (timeout) {
var now = Date.now()
var now = getTime()
if ((now + timeout) - (this._started + this._scheduled) < 0) {

@@ -61,2 +61,7 @@ return false

function getTime () {
var t = process.hrtime()
return Math.floor(t[0] * 1000 + t[1] / 1000000)
}
module.exports = retimer

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