browser-process-hrtime

WebJar for browser-process-hrtime

License

License

BSD 2-Clause
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

browser-process-hrtime
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

browser-process-hrtime
WebJar for browser-process-hrtime
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/kumavis/browser-process-hrtime

Download browser-process-hrtime

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/browser-process-hrtime/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>browser-process-hrtime</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/browser-process-hrtime/
implementation 'org.webjars.npm:browser-process-hrtime:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/browser-process-hrtime/
implementation ("org.webjars.npm:browser-process-hrtime:1.0.0")
'org.webjars.npm:browser-process-hrtime:jar:1.0.0'
<dependency org="org.webjars.npm" name="browser-process-hrtime" rev="1.0.0">
  <artifact name="browser-process-hrtime" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='browser-process-hrtime', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "browser-process-hrtime" % "1.0.0"
[org.webjars.npm/browser-process-hrtime "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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.

Versions

Version
1.0.0
0.1.3
0.1.2