From 8a31a2bed47d6cd244e7c70cf5e8c23a54aed6e8 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Tue, 2 Jan 2018 22:01:20 +0800 Subject: [PATCH] Rename to w3c-hr-time "hr-time" is apparently too similar to the existing "hrtime" module. --- README.md | 8 ++++---- package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7206404..3c4396e 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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); @@ -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); @@ -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(); diff --git a/package.json b/package.json index 8151600..8744038 100644 --- a/package.json +++ b/package.json @@ -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 ", "license": "MIT", "private": false,