{"_id":"microtime@4.0.1","bugs":{"url":"https://github.com/wadey/node-microtime/issues"},"dist":{"shasum":"ada813119ba263f9ddd29ef79b506faae6885654","tarball":"http://registry-npm.ywwl.com/microtime/download/microtime-4.0.1.tgz","fileCount":15,"integrity":"sha512-NLZSezO1CkWKHSF7g5OTKxKoij7qshJmJ5EHI8nez4trydS9F+hEPwvoE0AnjhFUoArarppFyy4zpdIZShLkkw==","signatures":[{"sig":"MEQCIC3go7mYts00Fsx2d8+eucDVbVDHWYnoJ6QRV6Fx6jhMAiA/7efoKUPDKYoPhi6lA+B8Hj27iFxhpw0wlPKEFpGthw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQClta14rG6sQ7OlyWL23jTa46XUpv2tzFiowKQ9tsDubQIgB87R8KUkyr+0uCQD5j/qRY0gQhvncd33dldz3kXYAOE="}],"unpackedSize":498675,"size":196614,"noattachment":false,"key":"/microtime/-/microtime-4.0.1.tgz"},"main":"./index","name":"microtime","author":{"url":"http://wades.im/mons","name":"Wade Simmons","email":"wade@wades.im"},"engines":{"node":">= 22.22.2"},"gitHead":"7fb862537feefc047078ef826f79568f1e0c5ac0","gypfile":true,"license":"MIT","scripts":{"test":"node test.js","format":"clang-format -i src/microtime.cc","install":"node-gyp-build","rebuild":"node-gyp rebuild","prebuild":"prebuildify -t 22.22.2 -t electron@35.2.0 --napi --strip","lint-test":"standard && clang-format -output-replacements-xml src/microtime.cc | (! grep -q '<replacement ') && node test.js","test-prebuild":"cross-env PREBUILDS_ONLY=1 npm t","download-prebuilds":"prebuildify-ci download","prebuild-linux-arm":"prebuildify-cross -i linux-armv6 -i linux-armv7 -i linux-arm64-lts -t 22.22.2 --napi --strip","prebuild-linux-x64":"prebuildify-cross -i almalinux-devtoolset11 -i alpine -t 22.22.2 -t electron@35.2.0 --napi --strip","prebuild-win32-x64":"prebuildify -t 22.22.2 -t electron@35.2.0 --napi --strip","prebuild-win32-x86":"prebuildify -t 22.22.2 -t electron@35.2.0 --napi --strip","prebuild-darwin-x64+arm64":"prebuildify -t 22.22.2 -t electron@35.2.0 --arch x64+arm64 --napi --strip"},"version":"4.0.1","_npmUser":{"name":"wadey","email":"wade@wades.im"},"homepage":"https://github.com/wadey/node-microtime","keywords":["microtime","microseconds","gettimeofday"],"repository":{"url":"git://github.com/wadey/node-microtime.git","type":"git"},"_npmVersion":"11.20.0","description":"Get the current time in microseconds","directories":{},"maintainers":[{"name":"wadey","email":"wade@wades.im"}],"_nodeVersion":"26.13.0","dependencies":{"node-addon-api":"^8.9.2","node-gyp-build":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"node-gyp":"^13.1.0","standard":"^17.1.0","cross-env":"^10.1.0","prebuildify":"^6.0.1","clang-format":"^1.8.0","prebuildify-ci":"^1.0.5","prebuildify-cross":"^5.1.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/microtime_4.0.1_1794454535221_0.19121592236135965"},"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":1794454535347,"_cnpm_publish_time":1794454535347,"dist-tags":{"latest":"4.0.1","n-api":"3.0.0-1"}}