{"_id":"relative-microtime","_rev":"2-3e823f5faa9eef0e756996bfa0a165a8","name":"relative-microtime","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"relative-microtime","version":"1.0.0","description":"Get the number of microseconds elapsed since January 1, 1970 00:00:00 UTC without fear of clock drift","main":"index.js","dependencies":{},"devDependencies":{"standard":"^12.0.1"},"scripts":{"test":"standard && node test.js"},"repository":{"type":"git","url":"git+https://github.com/watson/relative-microtime.git"},"keywords":["time","timer","clock","micro","microtime","hrtime","drift","skew","unix","epoch","posix"],"author":{"name":"Thomas Watson","email":"w@tson.dk","url":"https://twitter.com/wa7son"},"license":"MIT","bugs":{"url":"https://github.com/watson/relative-microtime/issues"},"homepage":"https://github.com/watson/relative-microtime#readme","coordinates":[55.778268,12.593064],"gitHead":"de4644dab676530fb4432b9be0673f740eaa873b","_id":"relative-microtime@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"watson","email":"w@tson.dk"},"dist":{"integrity":"sha512-Qri8iGjHDrMh13+QQbXrV/e3oSn87a2Egca2rZfE+c5k8TOkCFgbEekdm75RTA7rIpgalH4iCd1Zz+goD/UyKA==","shasum":"b46b13bf3cf1a5646b00d18499a96cc93d2573cc","tarball":"https://registry.npmjs.org/relative-microtime/-/relative-microtime-1.0.0.tgz","fileCount":4,"unpackedSize":3496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbo569CRA9TVsSAnZWagAAAGUP/229jihR6NcyOO8koMD5\nJSVjFhcPT3aFsFLEWGpwGSo8rtiCRgl6EvSs18Cl7ameO2khOdkg1i2aI9HM\nHBqIMKiofIT9E4q+gvZYub0pkLnNH6QStJshuM+2FlIOKc78LUYU4WtS0dn0\nTV4ZTCk570kSzSHfXD3+yoRtVyPW4KkKfFZJDsgthd9txvry4WcSG/X1sjFX\nQL9+rDfv8jQ6nEgcuLv81+VEyVhlSerq9z6WhM4RpRoAXABwrPP4JllEeDTV\netYV/mPvOhyYo21GM7RLcKqPTK4I+X1hyCDlC+9ubWP/ZBYtwa7VYA9MAfsx\nluh7uL0KN20Na1fhSjl5Zt8oDMBOihhHPSU6x72ODklloQiBp+3XVqumtKfZ\n1w/muroYtKr9W62UAIKSOngj6HirGBrICJ3w/Cccy/YBXqyttvfx7CPamKf5\nRc4BYhGr9DCVZb7ZXmK6maSGWK7vBVkW+peDdkpoAJU6wheIkqoKQB2EipGz\nerejkn8CVyZDuYZwAmewuMIZFIFtDuT1nu7S/WHli4+tBkkKnPeuD3F3aqOn\nG0N5OuNnwPHvXYbTXITjlGAMcGPIjF+d/3IPuPU5H7vG40MdEi62FeHq+hjC\nfLSUrSekK+GgnXGCN4cR2U6LAV4bKlIjincKPmXNl0NW10oLH9dHyQ7nCRNs\n4rKG\r\n=34AG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVlmXqThhxQPzN3FsndltGNeW42QeS3o5tWbyORM2IlQIhAJ0i2nObdfDsY+NOvJ6ukHR8ro2h5x7pQPWBSldcg9ef"}]},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/relative-microtime_1.0.0_1537449661188_0.31657370281636443"},"_hasShrinkwrap":false},"2.0.0":{"name":"relative-microtime","version":"2.0.0","description":"Get the number of microseconds elapsed since January 1, 1970 00:00:00 UTC without fear of clock drift","main":"index.js","dependencies":{},"devDependencies":{"standard":"^12.0.1"},"scripts":{"test":"standard && node test.js"},"repository":{"type":"git","url":"git+https://github.com/watson/relative-microtime.git"},"keywords":["time","timer","clock","micro","microtime","hrtime","drift","skew","unix","epoch","posix"],"author":{"name":"Thomas Watson","email":"w@tson.dk","url":"https://twitter.com/wa7son"},"license":"MIT","bugs":{"url":"https://github.com/watson/relative-microtime/issues"},"homepage":"https://github.com/watson/relative-microtime#readme","coordinates":[55.778279,12.593066],"gitHead":"e91dbc903809d5b5e1228e6a28b84f0032871b9a","_id":"relative-microtime@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"watson","email":"w@tson.dk"},"dist":{"integrity":"sha512-l18ha6HEZc+No/uK4GyAnNxgKW7nvEe35IaeN54sShMojtqik2a6GbTyuiezkjpPaqP874Z3lW5ysBo5irz4NA==","shasum":"cceed2af095ecd72ea32011279c79e5fcc7de29b","tarball":"https://registry.npmjs.org/relative-microtime/-/relative-microtime-2.0.0.tgz","fileCount":4,"unpackedSize":3778,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxjMVCRA9TVsSAnZWagAAJgAP/05WJQLdOrlkDy235WVV\nFcZlB9Gmg9zO1o1u3ZsqS5xgSCvKeQ/PdLWsW4eqVlZZuLO6MaNTybeszTrM\nyCI3LL0p5Zgvi88iYBpvMzB8qELKvGoYj4+NDRVG3pjHngCtNbVX6xeVIfJS\nip2o2mdgrw6rmMdYMCaQOLZUwHXYBDYbvR1zsfoHUbBn4HVlFjEy88G12NAz\ndHKnIWP5rJJUxBnhew1R89Tp1Mx82NCb6raN57VjTT5BNRTuP4WdluZzTlCB\n7CTpaqxB2U7MT1gNjc2rOs9AD4hJXFYbgxnG/N9liNAf4kcAb9QVEr51eHor\nJ7PYO0lOpLfTpM/0BSV/vimNfOUYX9xg9EXXNwLr00sOE16facPiOsQmJCsq\nFX3c2njC+wl4ID6q1VWIjws5YLUGCUL0P2RKBttcM2T2xfbAKjoJYIsZkG//\n19oCL038+RJ2kLBA8H0E3lh8LWuHHE8t/tc/2D6lLxaxMAky94kRecZ4fNB+\nrVkiukOhFH5ukA3Ig3mISdY9ZvJw090VtkbpLFoEQe+CayhbSDKe6+feGzju\nLQEjB95GaiBOZIScljBbLfkkeXRXLApGg5TZPmi/WicqK2IslkMxdqG5hpn/\nraH92qobrAFCl2I9Pb5c32CtLuvDSJQEjxkmnTAmPwPt6+O6tpoYBXl+LETm\ns2ub\r\n=ogOe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDau1szdUpXknKp0v83qIEULZsOVuQXK9qQEfpMl+M5VgIhAM3sxGvmOn9vKekgaPsFDisGsWw1FDBYThWLxy1VLXI0"}]},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/relative-microtime_2.0.0_1539715860557_0.6741058484515166"},"_hasShrinkwrap":false}},"time":{"created":"2018-09-20T13:21:01.187Z","1.0.0":"2018-09-20T13:21:01.302Z","modified":"2022-05-15T17:35:39.572Z","2.0.0":"2018-10-16T18:51:00.696Z"},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"description":"Get the number of microseconds elapsed since January 1, 1970 00:00:00 UTC without fear of clock drift","homepage":"https://github.com/watson/relative-microtime#readme","keywords":["time","timer","clock","micro","microtime","hrtime","drift","skew","unix","epoch","posix"],"repository":{"type":"git","url":"git+https://github.com/watson/relative-microtime.git"},"author":{"name":"Thomas Watson","email":"w@tson.dk","url":"https://twitter.com/wa7son"},"bugs":{"url":"https://github.com/watson/relative-microtime/issues"},"license":"MIT","readme":"# relative-microtime\n\nThis module returns the number of microseconds elapsed since January 1,\n1970 00:00:00 UTC.\n\nNote: The returned number of microseconds are locked relative to a\nspecific time and is therefore not subject to clock drift. This is\ncontrary to how `Date.now()` operates, whos return value (in\nmilliseconds) is always based on the system clock.\n\n[![npm](https://img.shields.io/npm/v/relative-microtime.svg)](https://www.npmjs.com/package/relative-microtime)\n[![build status](https://travis-ci.org/watson/relative-microtime.svg?branch=master)](https://travis-ci.org/watson/relative-microtime)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)\n\n## Installation\n\n```\nnpm install relative-microtime --save\n```\n\n## Usage\n\n```js\nconst timer = require('relative-microtime')()\n\nconst milli = Date.now()\nconst micro = timer()\n\nconsole.log(milli) // 1537446194859\nconsole.log(micro) // 1537446194859132\n```\n\n## Gotcha\n\n## API\n\n### `timer = microtime()`\n\nSync the microtime clock to the UTC wall clock.\n\nReturns a `timer` function synced with the UTC time when `microtime()`\nwas called. Any clock drift that happens after the call to `microtime()`\nwill not influence the returned `timer`.\n\n### `timer()`\n\nReturns a `Number` representing the microseconds elapsed since the UNIX\nepoch.\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"}