{"_id":"@ljharb/now","_rev":"2-914462b1defa31e7ea7c72a96f8d7d88","name":"@ljharb/now","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@ljharb/now","version":"1.0.0","keywords":["now","time","timestamp","monotonic","clock","high-resolution","hrtime","performance.now","elapsed","duration"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","_id":"@ljharb/now@1.0.0","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"homepage":"https://github.com/ljharb/now#readme","bugs":{"url":"https://github.com/ljharb/now/issues"},"dist":{"shasum":"6ddc025cd54095a8095ded9b8ddc9b9e4ee35210","tarball":"https://registry.npmjs.org/@ljharb/now/-/now-1.0.0.tgz","fileCount":14,"integrity":"sha512-cRjO9Ic70TSXeFm+5z1Pvi9MwU5lgUBzO27QwtYm6w+RJA0RVNEh7LrDw6YUbCYew/DZx8s9hQq4Es9CIlGImg==","signatures":[{"sig":"MEUCIHoiIc6gw5FL5tCuy8YCSQoHM5ltuKaJ4PGlvwTLOMpyAiEApMEJwIAGpsqx1WsARkhAgd78nn9IEn2KMU62MTANiv4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10675},"main":"index.js","types":"./index.d.ts","engines":{"node":">= 0.4"},"exports":{".":"./index.js","./package.json":"./package.json"},"funding":{"url":"https://github.com/sponsors/ljharb"},"gitHead":"928c3499e41d599c3e652dd7535cb311214e1358","scripts":{"lint":"eslint .","test":"npm run tests-only","prelint":"evalmd README.md","prepack":"npmignore --auto --commentLines=autogenerated","pretest":"npm run lint","version":"auto-changelog && git add CHANGELOG.md","postlint":"tsc -p . && attw -P","posttest":"npx npm@\">= 10.2\" audit --production","prepublish":"not-in-publish || npm run prepublishOnly","tests-only":"nyc tape 'test/**/*.js'","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"","prepublishOnly":"safe-publish-latest"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"repository":{"url":"git+https://github.com/ljharb/now.git","type":"git"},"_npmVersion":"11.16.0","description":"The current time in milliseconds, from the most precise monotonic clock available (`performance.now` → `process.hrtime` → `Date.now` → `new Date().getTime()`), for measuring elapsed time.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"call-bound":"^1.0.4","get-intrinsic":"^1.3.0","call-bind-apply-helpers":"^1.0.2"},"publishConfig":{"access":"public","ignore":[".github/workflows"]},"_hasShrinkwrap":false,"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false,"autodetectMonorepoDisabled":false},"devDependencies":{"nyc":"^10.3.2","jiti":"^0.0.0","tape":"^5.9.0","eslint":"^10.4.1","evalmd":"^0.0.19","resolve":"^2.0.0-next.7","npmignore":"^0.3.5","in-publish":"^2.0.1","typescript":"next","@types/node":"^25.9.2","@types/tape":"^5.8.1","mock-property":"^1.1.0","auto-changelog":"^2.6.0","@ljharb/tsconfig":"^0.3.2","safe-publish-latest":"^2.0.0","@types/get-intrinsic":"^1.2.3","@arethetypeswrong/cli":"^0.18.3","@ljharb/eslint-config":"^22.2.3"},"_npmOperationalInternal":{"tmp":"tmp/now_1.0.0_1780948342242_0.4451432540019742","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"_id":"@ljharb/now@1.0.1","bugs":{"url":"https://github.com/ljharb/now/issues"},"dist":{"shasum":"15d05e76acd15f89f99e2b5203f4e01252bac058","tarball":"https://registry.npmjs.org/@ljharb/now/-/now-1.0.1.tgz","integrity":"sha512-yRQ3B8l2v4vTLQ2l+4kBu6EsXaX7czuLB7fvUz0vkHHziHje75R2t/0Mm/vIo31tlZVCEvCoXHkNKW+ugv3uSA==","fileCount":17,"unpackedSize":12251,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEodcfUOz2OBEx9rzYB4/QiTDbjgHHMDVJ2dnGtGcgNKAiEA7b/N2YOo/NBtlmCFnYpNB5jxmkRSXlxUyMtcVrif+mw="}]},"main":"index.js","name":"@ljharb/now","types":"./index.d.ts","author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"browser":"browser.js","engines":{"node":">= 0.4"},"exports":{".":[{"import":"./index.mjs","browser":"./browser.js","default":"./index.js"},"./index.js"],"./package.json":"./package.json"},"funding":{"url":"https://github.com/sponsors/ljharb"},"gitHead":"8f86352c68d6082a8685779c5ceb503bc8249027","license":"MIT","scripts":{"lint":"eslint .","test":"npm run tests-only","prelint":"evalmd README.md","prepack":"npmignore --auto --commentLines=autogenerated","pretest":"npm run lint","version":"auto-changelog && git add CHANGELOG.md","postlint":"tsc -p . && attw -P","posttest":"npx npm@\">= 10.2\" audit --production","prepublish":"not-in-publish || npm run prepublishOnly","tests-only":"nyc tape 'test/**/*.js'","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"","prepublishOnly":"safe-publish-latest"},"version":"1.0.1","_npmUser":{"name":"ljharb","email":"ljharb@gmail.com","approver":{"name":"ljharb","email":"ljharb@gmail.com"}},"homepage":"https://github.com/ljharb/now#readme","keywords":["now","time","timestamp","monotonic","clock","high-resolution","hrtime","performance.now","elapsed","duration"],"repository":{"url":"git+https://github.com/ljharb/now.git","type":"git"},"_npmVersion":"11.16.0","description":"The current time in milliseconds, from the most precise monotonic clock available (`performance.now` → `process.hrtime` → `Date.now` → `new Date().getTime()`), for measuring elapsed time.","directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"call-bound":"^1.0.4","get-intrinsic":"^1.3.0","call-bind-apply-helpers":"^1.0.2"},"publishConfig":{"access":"public","ignore":[".github/workflows"]},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false,"autodetectMonorepoDisabled":false},"devDependencies":{"nyc":"^10.3.2","jiti":"^0.0.0","tape":"^5.9.0","eslint":"^10.4.1","evalmd":"^0.0.19","semver":"^6.3.1","npmignore":"^0.3.5","in-publish":"^2.0.1","typescript":"next","@types/node":"^25.9.2","@types/tape":"^5.8.1","@types/semver":"^6.2.7","mock-property":"^1.1.0","require-stash":"^1.0.0","auto-changelog":"^2.6.0","@ljharb/tsconfig":"^0.3.2","safe-publish-latest":"^2.0.0","@types/get-intrinsic":"^1.2.3","@arethetypeswrong/cli":"^0.18.3","@ljharb/eslint-config":"^22.2.3"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/now_1.0.1_1780978104209_0.12574792938349577"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-08T19:52:22.092Z","modified":"2026-06-09T04:08:24.439Z","1.0.0":"2026-06-08T19:52:22.380Z","1.0.1":"2026-06-09T04:08:24.316Z"},"bugs":{"url":"https://github.com/ljharb/now/issues"},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","homepage":"https://github.com/ljharb/now#readme","keywords":["now","time","timestamp","monotonic","clock","high-resolution","hrtime","performance.now","elapsed","duration"],"repository":{"url":"git+https://github.com/ljharb/now.git","type":"git"},"description":"The current time in milliseconds, from the most precise monotonic clock available (`performance.now` → `process.hrtime` → `Date.now` → `new Date().getTime()`), for measuring elapsed time.","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"readme":"# @ljharb/now <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nThe current time, in milliseconds, from the most precise monotonic clock available - `performance.now()`, then `process.hrtime()`, then `Date.now()`, then `new Date().getTime()` (for ES3). Works in browsers and node, all the way back to ES3.\n\nThe returned value has an arbitrary origin and is only meaningful relative to another call:\nsubtract two readings to get an elapsed duration, in milliseconds.\nWhere the platform provides a monotonic clock (the first two tiers),\nit is unaffected by system clock changes.\n\n## Usage / Example\n\n```javascript\nvar now = require('@ljharb/now');\nvar assert = require('assert');\n\nassert.equal(typeof now(), 'number');\n\nvar start = now();\n// ... do some work ...\nvar elapsed = now() - start;\n\nassert.equal(typeof elapsed, 'number');\nassert.ok(elapsed >= 0);\n```\n\n[package-url]: https://npmjs.org/package/@ljharb/now\n[npm-version-svg]: https://versionbadg.es/ljharb/now.svg\n[npm-badge-png]: https://nodei.co/npm/@ljharb/now.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/@ljharb/now.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/@ljharb/now.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=@ljharb/now\n[codecov-image]: https://codecov.io/gh/ljharb/now/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/ljharb/now/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/now\n[actions-url]: https://github.com/ljharb/now/actions\n","readmeFilename":"README.md"}