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

hirestime

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hirestime - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

5

package.json
{
"name": "hirestime",
"version": "0.2.1",
"version": "0.2.2",
"description": "thin wrapper around process.hrtime",

@@ -25,4 +25,5 @@ "main": "index.js",

"mocha": "~1.15.1",
"chai": "~1.8.1"
"chai": "~1.8.1",
"hrtimemock": "0.0.1"
}
}

24

tests/tests.js
var expect = require('chai').expect;
var hrtimeMock = require('hrtimemock');
var hirestime = require('../');
function hrtimeMock(msTime) {
var _hrtime = process.hrtime;
var returnValue = [
parseInt(msTime / 1e3, 10),
(msTime % 1000) * 1e6
];
var isFirst = true;
process.hrtime = function() {
if(isFirst) {
isFirst = false;
return [];
} else {
isFirst = true;
process.hrtime = _hrtime;
return returnValue;
}
}
}
describe('hirestime', function() {

@@ -29,0 +7,0 @@

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