{"name":"time-span","version":"4.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"},"engines":{"node":">=10"},"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":"^3.0.0"},"devDependencies":{"ava":"^1.4.1","delay":"^4.1.0","in-range":"^2.0.0","tsd":"^0.11.0","xo":"^0.24.0"},"gitHead":"3ddda6bce4cbbcff25dcd47aef69849c7b9183bf","bugs":{"url":"https://github.com/sindresorhus/time-span/issues"},"homepage":"https://github.com/sindresorhus/time-span#readme","_id":"time-span@4.0.0","_nodeVersion":"10.18.1","_npmVersion":"6.14.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-MyqZCTGLDZ77u4k+jqg4UlrzPTPZ49NDlaekU6uuFaJLzPIN1woaRXCbGeqOfxwc3Y37ZROGAJ614Rdv7Olt+g==","shasum":"fe74cd50a54e7998712f90ddfe47109040c985c4","tarball":"http://registry-npm.ywwl.com/time-span/download/time-span-4.0.0.tgz","fileCount":5,"unpackedSize":3849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaaqFCRA9TVsSAnZWagAAuDwP/0PVBRvsQuP6GZsnFRYs\nqcp9ARpvUJBIfUHBrdiT6Q8S5I9NkbOzo1LxUpfIdYdGfMTmXu8mffY5Ta0i\niiPXemu/UlTyZWr47xjA5I33bZMPT+oHyYwJwn07BKNQlVLoBJIO3ipcusZ+\nuITTQ6jEqjCBXzaQ4VSU60sISstZ+v5X7lqJoZWUaW8Rsi+Ld38khI8Lr8yL\n5K04q3vaqXRN7gmOxFPSrqQ5DaiTbCtyH6zbnyquVxvnkzwGIZs4EOrbWdJQ\nL4KyVa40hTlrUIq7HhaduJJLsblmBBEYcNDZf9bJz2xqaRKs9/JVjYve7zMz\nCUU5ivPxW0Dzys5LgAVIrdJW/oQfZ449++Km2RgPu+jaGy11aLN4kyzfZClY\n1LeSKS3s5xrF+fOm0GzPN7xux9QMscSQtjJmAR++G5IoSicgaHsqJFAVA8QB\nU445b64knk2ORZbYRnqwB+HGf6t3fH4MNZyaMOsdHwnW22cuki/b2WqCQsgb\nwHgSCBJKjvKwffX/u98CqMOEFGbc57Cbw6mlA3IJotmbWvKX6AJgvM6QnlYU\nn8FGKa+sIwKqDgqBM6kHSY7Z5yVOXys/sPDxVrmG3g0p1QryIGxasDUe3UuD\nGP22t6tZ+cF7+2HVQpEMYYmKo1cxUNQLLjAxVI1MF58YZmEzbEfx9/2HqA9a\nITP1\r\n=1RMF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICzZL3JOGPpQ/pdDvWI0s3FW8v50pPy0orHwJF8vZfLZAiAJGJlmohc/pTSgkYdnwMB+uFqTGeaPkfNrKasONNGQ9Q=="}],"size":1841,"noattachment":false,"key":"/time-span/-/time-span-4.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/time-span_4.0.0_1583983236724_0.21260002612421203"},"_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":1583983236867,"_cnpm_publish_time":1583983236867,"dist-tags":{"latest":"5.1.0"}}