Skip to content
This repository has been archived by the owner on Oct 16, 2022. It is now read-only.

Commit

Permalink
Rename to w3c-hr-time
Browse files Browse the repository at this point in the history
"hr-time" is apparently too similar to the existing "hrtime" module.
  • Loading branch information
TimothyGu committed Jan 2, 2018
1 parent 9730d9c commit 8a31a2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# hr-time
# w3c-hr-time

This module implements the W3C [High Resolution Time Level 2][HR-TIME] specification. It provides exactly three exports:

Expand All @@ -15,7 +15,7 @@ Portability is paramount to this module. It uses only APIs exposed from Node.js
Probably the most interesting export is the [`Performance`][] class.

```js
const { Performance } = require("hr-time");
const { Performance } = require("w3c-hr-time");
const performance = new Performance();

console.log(performance.timeOrigin);
Expand Down Expand Up @@ -52,7 +52,7 @@ The High Resolution Time spec defines a [global monotonic clock][] that is "shar
This module exports a function `getGlobalMonotonicClockMS()` that is the basis of all timing functions used my this module when a monotonic time is required. It returns a high-resolution timestamp whose zero value is at some arbitrary point in the past. (For the current high-resolution timestamp based on the Unix epoch, use `new Performance().timeOrigin` instead.)

```js
const { getGlobalMonotonicClockMS } = require("hr-time");
const { getGlobalMonotonicClockMS } = require("w3c-hr-time");

const start = getGlobalMonotonicClockMS();
console.log(start);
Expand All @@ -78,7 +78,7 @@ The High Resolution Time spec [specifies][`DOMHighResTimeStamp`] that
This module implements this suggestion faithfully. It executes a test at `require()`-time to determine if the system clock (both `Date.now()` and `process.hrtime()`) is accurate enough to 5 microseconds. The result of this test can be accessed through the exported `clockIsAccurate` boolean value.

```js
const { Performance, clockIsAccurate } = require("hr-time");
const { Performance, clockIsAccurate } = require("w3c-hr-time");

const performance = new Performance();

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "hr-time",
"name": "w3c-hr-time",
"version": "1.0.0",
"description": "An implementation of the W3C High Resolution Time Level 2 specification.",
"main": "index.js",
"repository": "https://github.com/jsdom/hr-time",
"repository": "https://github.com/jsdom/w3c-hr-time",
"author": "Timothy Gu <[email protected]>",
"license": "MIT",
"private": false,
Expand Down

0 comments on commit 8a31a2b

Please sign in to comment.