
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
browser-process-hrtime
Advanced tools
Browser shim for Node.js process.hrtime().
See documentation at nodejs.org
This module does not provide the same level of time precision as node.js, but provides a matching API and response format.
Use hrtime independent of environment (node or browser).
It will use process.hrtime first and fallback if not present.
const hrtime = require('browser-process-hrtime')
const start = hrtime()
// ...
const delta = hrtime(start)
You can monkey-patch process.hrtime for your dependency graph like this:
process.hrtime = require('browser-process-hrtime')
const coolTool = require('module-that-uses-hrtime-somewhere-in-its-depths')
This was originally pull-requested against node-process, but they are trying to stay lean.
This package provides a function that returns the current timestamp in milliseconds. It's similar to browser-process-hrtime but does not provide nanosecond precision.
hrtime is another shim for process.hrtime. It offers similar functionality to browser-process-hrtime, providing high-resolution real-time stamps.
nano-time gives you the current time in nanoseconds as a string. It's similar to browser-process-hrtime in that it provides high precision timing, but it does not use the same API as process.hrtime.
FAQs
Shim for process.hrtime in the browser
The npm package browser-process-hrtime receives a total of 10,061,638 weekly downloads. As such, browser-process-hrtime popularity was classified as popular.
We found that browser-process-hrtime demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.