🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

browser-process-hrtime

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-process-hrtime - npm Package Compare versions

Comparing version

to
0.1.2

8

index.js

@@ -16,5 +16,5 @@ module.exports = process.hrtime || hrtime

function hrtime(previousTimestamp){
var clocktime = performanceNow.call(performance)/10e3
var clocktime = performanceNow.call(performance)*1e-3
var seconds = Math.floor(clocktime)
var nanoseconds = (clocktime%1)*10e9
var nanoseconds = Math.floor((clocktime%1)*1e9)
if (previousTimestamp) {

@@ -25,6 +25,6 @@ seconds = seconds - previousTimestamp[0]

seconds--
nanoseconds += 10e9
nanoseconds += 1e9
}
}
return [seconds,nanoseconds]
}
}
{
"name": "browser-process-hrtime",
"version": "0.1.1",
"version": "0.1.2",
"description": "Shim for process.hrtime in the browser",

@@ -5,0 +5,0 @@ "main": "index.js",