{"name":"time-span","version":"5.0.0","description":"Simplified high resolution timing","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/time-span.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["time","span","elapsed","process","hrtime","highres","timing","perf","performance","bench","benchmark","profiling","measure","seconds","milliseconds","nanoseconds"],"dependencies":{"convert-hrtime":"^5.0.0"},"devDependencies":{"ava":"^3.15.0","delay":"^5.0.0","in-range":"^3.0.0","tsd":"^0.14.0","xo":"^0.38.2"},"gitHead":"d85de230a53a36618b3580ad498446231f80cf83","bugs":{"url":"https://github.com/sindresorhus/time-span/issues"},"homepage":"https://github.com/sindresorhus/time-span#readme","_id":"time-span@5.0.0","_nodeVersion":"15.12.0","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-6x1S1sA6AFbXCa2IUkZNJr6vJ6oVuK+m4YZXQs4Rf8256EQIQg6JSS/hSrs3k15GRDGV3vrWgmav5qHIytTyKQ==","shasum":"35bf9d75a11ea0f19fbe8282162a55439f58aa8b","tarball":"http://registry-npm.ywwl.com/time-span/download/time-span-5.0.0.tgz","fileCount":5,"unpackedSize":3701,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdpt0CRA9TVsSAnZWagAA0CEQAIzYkfixc+G8oCzetEZp\nuzwmgq1SeAUwua97h9StcYaZ4lHCFiUT6F7LtU8YELRfxXgTIbKSCteK6/Ww\n9MmSDAGDVTB0a74F0H4n2qx94hVILi2oC5bOPcAOQeM/Fh0Q+W6tXeI2uSpH\nClVorKTyWitU0P1eDugwSYR9l9EsLY3cYt1aI4p31iiVAy81UrRzpHtPBl0b\nGPMKq33AH4L3LJLGHaSB2jFjFWRAUTGdFOnp6mJngSauaobfFL0RGZnAymHP\niLPbz8/tLI/89dQrCVMpZa9IwlD9qHMjszOJgyQPc5givxRJGt4l2tkb9qON\nQUQ1FxqGbY0J7eC4Wa8YVeEdZ0hr1E0zHC8XTjIUlucOpDrL76LO1csPHhFl\nsYtYAsdXOrYv55U08Msw0cfIhc3J1QmzZVwmjRkkO9svd6ZjfAHD+his7qBc\n3aRFI/R9ylZFNWcKy4HubhTjh6yL1QYXh9rFYIyo6uv/1m4Ltxmgs4oeUj0b\nHzMaJ2jnPHJPfB3nbzvFZdQdQudZiLdASRtL66Ym2hk9d+j29V9hJ6rt/K7Y\nsMaI2Zvc+a8WHOPUeyDvDWELEC9+y1v48oxELT14h2HvVtrgiJ7lPfdHcW6d\nVXE7EIOm+LeEA87LmcoyZ2jUdxcWZo3M20QKsYVbIiyXL3uoqN9qgpdDq5Oz\nPsqV\r\n=N+ki\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAcBdvlITNNAemuiB73UjzGnZvs3RQ15Beq2cgsEPm0wAiEAqSyPAkUEkplL7UC3SwXnGy7wBgdXAdD9touNHzVLwWk="}],"size":1776,"noattachment":false,"key":"/time-span/-/time-span-5.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/time-span_5.0.0_1618385780277_0.05069404779858222"},"_hasShrinkwrap":false,"readme":"# time-span\n\n> Simplified high resolution timing\n\nUses [`process.hrtime`](https://nodejs.org/api/process.html#processhrtimebigint) in Node.js and [`performance.now`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now) in browsers ([accurate to 5 microseconds](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp)).\n\n## Install\n\n```\n$ npm install time-span\n```\n\n## Usage\n\n```js\nimport timeSpan from 'time-span';\n\nconst end = timeSpan();\n\ntimeConsumingFn();\n\nconsole.log(end());\n//=> 1745.3186\n\nconsole.log(end.rounded());\n//=> 1745\n\nconsole.log(end.seconds());\n//=> 1.7453186\n```\n\n## API\n\n### `const end = timeSpan()`\n\nReturns a function, that when called, returns the time difference.\n\n#### end()\n\nElapsed milliseconds.\n\n#### end.rounded()\n\nElapsed milliseconds rounded.\n\n#### end.seconds()\n\nElapsed seconds.\n\n#### end.nanoseconds()\n\nElapsed nanoseconds.\n","publish_time":1618385780453,"_cnpm_publish_time":1618385780453,"dist-tags":{"latest":"5.1.0"}}