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.1.0 to 2.0.0

time-browser.js

7

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

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

"pre-commit": "^1.0.10",
"standard": "^10.0.0",
"standard": "^12.0.0",
"tape": "^4.0.0"
},
"browser": {
"./time.js": "./time-browser.js"
}
}

@@ -10,4 +10,4 @@ # retimer  [![Build Status](https://travis-ci.org/mcollina/retimer.png)](https://travis-ci.org/mcollina/retimer)

* `benchSetTimeout*100`: 51867ms
* `benchRetimer*100`: 34237ms
* `benchSetTimeout*100: 36912.680ms`
* `benchRetimer*100: 33213.134ms`

@@ -14,0 +14,0 @@ ## Install

'use strict'
var assert = require('assert')
var getTime = require('./time')

@@ -42,5 +42,10 @@ function Retimer (callback, timeout, args) {

function retimer () {
assert.equal(typeof arguments[0], 'function', 'callback needed')
assert.equal(typeof arguments[1], 'number', 'timeout needed')
if (typeof arguments[0] !== 'function') {
throw new Error('callback needed')
}
if (typeof arguments[1] !== 'number') {
throw new Error('timeout needed')
}
var args

@@ -59,7 +64,2 @@

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