{"name":"microtime","version":"3.1.0","description":"Get the current time in microseconds","author":{"name":"Wade Simmons","email":"wade@wades.im","url":"http://wades.im/mons"},"homepage":"https://github.com/wadey/node-microtime","repository":{"type":"git","url":"git://github.com/wadey/node-microtime.git"},"main":"./index","license":"MIT","keywords":["microtime","microseconds","gettimeofday"],"engines":{"node":">= 14.13.0"},"scripts":{"install":"node-gyp-build","rebuild":"node-gyp rebuild","prebuild":"prebuildify -t 14.13.0 -t electron@18.2.0 --napi --strip","prebuild-linux-x64":"prebuildify -t 14.13.0 -t electron@18.2.0 --napi --strip","prebuild-linux-arm":"prebuildify-cross -i linux-armv7 -t 14.13.0 --napi --strip","prebuild-darwin-x64+arm64":"prebuildify -t 14.13.0 -t electron@18.2.0 --arch x64+arm64 --napi --strip","prebuild-win32-x64":"prebuildify -t 14.13.0 -t electron@18.2.0 --napi --strip","prebuild-win32-x86":"prebuildify -t 14.13.0 -t electron@18.2.0 --napi --strip","download-prebuilds":"prebuildify-ci download","test":"node test.js","format":"clang-format -i src/microtime.cc","lint-test":"standard && clang-format -output-replacements-xml src/microtime.cc | (! grep -q '<replacement ') && node test.js"},"dependencies":{"node-addon-api":"^5.0.0","node-gyp-build":"^4.4.0"},"devDependencies":{"clang-format":"^1.8.0","node-gyp":"^9.0.0","prebuildify":"^5.0.0","prebuildify-ci":"^1.0.5","prebuildify-cross":"^5.0.0","standard":"^12.0.1"},"gypfile":true,"gitHead":"4e312dd0495168796d5e34c1a344c856059a255f","bugs":{"url":"https://github.com/wadey/node-microtime/issues"},"_id":"microtime@3.1.0","_nodeVersion":"14.19.3","_npmVersion":"8.12.1","dist":{"integrity":"sha512-GcjhfC2y/DF2znac8IRwri7+YUIy34QRHz/iZK3bHrh74qrNNOpAJQwiOMnIG+v1J0K4eiqd+RiGzN3F1eofTQ==","shasum":"599a71250e3116c59f0fe5271dae4cc44321869c","tarball":"http://registry-npm.ywwl.com/microtime/download/microtime-3.1.0.tgz","fileCount":20,"unpackedSize":2716313,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYuNxv7/B5Q21LwhkrR0S+b/kWvpI8lyen/z0cKbzIiwIgCv2PQUiR17zAQd3csmGCTjoSbA/jvrtCv4oUAMCTqw0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJioWX9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDLg//Tg6lOAty1rdK74UKZ9b+f6KdVxhO1piTLMOyYL3zGJwq6XS+\r\neXNYJYT0l+6YGX/WZAj0UWTvsA9zpVLomrU2m391fNNgu9EIyeLSjo9gl56X\r\nyIgdm0IZ3rYWt9vBLX/jmpPO+1xqIHyN7Uzikq1W7uHj0vMZLDUu8rHexpw6\r\nCnS42C+kHIYD98Md1z07tFfW+b9r/1ZCDEDDDlegIK/EChtjds+vDTwbzJXc\r\ndYgDhk76lkAlSnpzE3uBr/dyuDcwsk2LSsihoPvgzETD+cZ1dFZznE09ZmtQ\r\ngyWqlWf2k2pvl6hzC2CuzErftUKUp9WTEab8LM7+KVb87KQGiHqK60pXlHjD\r\nkuaR26hoM1XqgeTtXTfUQr2eAeJ9J3WPKF/97tqgAneFEeiAQCaslQbhd9Pz\r\nMUfRlIQ6yQ6Eq4z3RAtyWSvrtkPBQMCmV5PAklTn8D5m2rgQZQVA1Pg1gp0x\r\npgDYuB5p7k7J8BusnDWpvDEOySKdnu9qmtzgupSgnYNJhzLKKVQ2EXP/c04v\r\nfspBT14j7zjVrlthn/rd1lNSOOV7NZAzw+K5GmIZMe8VW83Z+Of96e6lUI6l\r\n9a8bInCUEmh8iiKhDugLc+X9Rw79eiNYcHgJak4WFD5gkyS6LJlCo0shPUN6\r\nY/8BN827VzOTztUlahH02GKN2gBUqXW2LRA=\r\n=zwPU\r\n-----END PGP SIGNATURE-----\r\n","size":837532,"noattachment":false,"key":"/microtime/-/microtime-3.1.0.tgz"},"_npmUser":{"name":"wadey","email":"wade@wades.im"},"directories":{},"maintainers":[{"name":"wadey","email":"wade@wades.im"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/microtime_3.1.0_1654744573458_0.12769998156827356"},"_hasShrinkwrap":false,"readme":"# node-microtime\n\n[![npm](https://img.shields.io/npm/dm/microtime.svg)](https://www.npmjs.com/package/microtime)\n[![npm](https://img.shields.io/npm/v/microtime.svg)](https://www.npmjs.com/package/microtime)\n\nDate.now() will only give you accuracy in milliseconds. This module calls\n`gettimeofday(2)` to get the time in microseconds and provides it in a few\ndifferent formats. The same warning from that function applies:\n_The resolution of the system clock is hardware dependent, and the time may\nbe updated continuously or in ``ticks.''_\n\n## N-API Support\n\nAs of version `3.0.0`, this library is built using the [N-API](https://nodejs.org/api/n-api.html) library. This should allow you to upgrade to newer versions of Node.js without having to reinstall / rebuild this library.\n\nVersion `3.0.0` and later also bundle prebuilt binaries for common systems in\nthe npm package itself. These will be used if the version of Node you are using\nsupports N-API ([>= v6.14.2](https://nodejs.org/api/n-api.html#n_api_n_api_version_matrix)), otherwise the binary will be recompiled on install.\n\n# Installation\n\n    npm install microtime\n\n# Usage\n\n### microtime.now()\n\nGet the current time in microseconds as an integer.\n\n### microtime.nowDouble()\n\nGet the current time in seconds as a floating point number with microsecond\naccuracy (similar to `time.time()` in Python and `Time.now.to_f` in Ruby).\n\n### microtime.nowStruct()\n\nGet the current time and return as a list with seconds and microseconds (matching the return value of `gettimeofday(2)`).\n\n# Example\n\n    > var microtime = require('microtime')\n    > microtime.now()\n    1297448895297028\n    > microtime.nowDouble()\n    1297448897.600976\n    > microtime.nowStruct()\n    [ 1297448902, 753875 ]\n\n## Estimating clock resolution\n\nStarting with version 0.1.3, there is a test script that tries to guess the clock resolution. You can run it with `npm test microtime`. Example output:\n\n    microtime.now() = 1298960083489806\n    microtime.nowDouble() = 1298960083.511521\n    microtime.nowStruct() = [ 1298960083, 511587 ]\n\n    Guessing clock resolution...\n    Clock resolution observed: 1us\n","publish_time":1654744573683,"_cnpm_publish_time":1654744573683,"dist-tags":{"latest":"4.0.1","n-api":"3.0.0-1"}}