{"name":"time-span","version":"3.1.0","description":"Simplified high resolution timing","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/time-span.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"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":"^2.0.0"},"devDependencies":{"ava":"^1.4.1","delay":"^4.1.0","in-range":"^1.0.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"84b484306d26615f6c3f466b6efb57e86eea98a4","bugs":{"url":"https://github.com/sindresorhus/time-span/issues"},"homepage":"https://github.com/sindresorhus/time-span#readme","_id":"time-span@3.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-iol7ZQkkMAtlveWFZdTmphGho2RZcUrrg8E3U+YfeDCjFil0sPFU4Q+iyi21HDPwY3vieXV2bjAla75uA6WW+w==","shasum":"7c33a0dcc3f46199c966f532ac48442bfc7f7c0d","tarball":"http://registry-npm.ywwl.com/time-span/download/time-span-3.1.0.tgz","fileCount":5,"unpackedSize":4167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpv0dCRA9TVsSAnZWagAAnkAP/R9sDYTrA2UqMthqmdIm\ngNwc8akZTYXj5iXdZ2r5qLYle7FZY7CQWxE4i+sKCsCVsomu7k0mtdl86FXk\nnQ7iVCUpJBnzOimuSHQ3WXPgTBjXeIK7UwiKu4Br9WBmpNHT4T34bmpeIiu/\nuZcVQaCYgfmjHugLW1+EbkAaGr6WyZcpRa5hTTsP45RpD/rbI7HWWnw73uTY\niJTLKyPfyciKkvXoYmjyIRvh+ACfxGbMGo9D9sqwPaJQrt1T5RB4n165PyIs\nuNSpEXevN5srh2/NmqaWROqM8xBf7ViwwMgPaq1Wsd+JnvpGBhwrfx4D/2YU\njmaXDwO0ss8IWGGVVGGb4hKXcTvPfhJ30Xc+hKR9lNn5ZHwyNAnu+BNg7iQJ\ntDaDKjiysH6y/O13dzfw2gEfEls0/onLsiB9sk8DwAfTJmHn2NPCjFgo5lxi\n/75yX5om2dHkdlNm5Kltb8wCyEKHOwEvdvkf1dYVXaB8h+HZPyQ6M5HSHsEI\nHc9Nf1JYTesNmAWT1LnDKJh5HK5CTj4JonqKqR4OnfUWuTl3uMIxtPTkFSQx\n+jJh+J7zM0H+fAfrILATROleuab1WJS7D7moRQMfyZ2PsRlTMkEAJ2lP04n1\naom81Dl80HYeE/cpvrE4lZM8DWBL/a4394Wq5oqeu9ZgUesNpeJbgHpmIVsu\nSiso\r\n=clAU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAGEyIiu2goj4NPcg3Ay8jJ7R0aVpuz4iHFUsLMgjJoqAiEAqyLF7SM5QZ5F4ag8rvCl/iikdldUaShbt6KRSml/oJQ="}],"size":1953,"noattachment":false,"key":"/time-span/-/time-span-3.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/time-span_3.1.0_1554447645142_0.9790910402857895"},"_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":1554447645347,"_cnpm_publish_time":1554447645347,"dist-tags":{"latest":"5.1.0"}}