Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inDemoInstall

browser-process-hrtime

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Issues
File Explorer

Advanced tools

browser-process-hrtime

Shim for process.hrtime in the browser

    1.0.0latest
    Github

Version published
Maintainers
1
Weekly downloads
14,190,053
decreased by-0.12%

Weekly downloads

Readme

Source

browser-process-hrtime

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.

usage

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)

monkey-patching

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')

note

This was originally pull-requested against node-process, but they are trying to stay lean.

FAQs

What is browser-process-hrtime?

Shim for process.hrtime in the browser

Is browser-process-hrtime popular?

The npm package browser-process-hrtime receives a total of 11,489,587 weekly downloads. As such, browser-process-hrtime popularity was classified as popular.

Is browser-process-hrtime well maintained?

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.

Last updated on 23 Sep 2018

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket[email protected]

Product

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc