package
Generates a timestamp down to the microsecond
npm install precision-timestampGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Gets a precise (to the microsecond) UNIX timestamp.

$ yarn add precision-timestampThe returned function is a wrapper for either microtime (see Optimizing),
process.hrtime() or Date.now().
const ptime = require('precision-timestamp');
console.log(ptime()); //-> [12184342834, 23942834]
// ^ ^
// seconds microsecondsBy default, most Node instances are going to default to the process.hrtime() implementation
which should be entirely sufficient.
However, for a considerable performance improvement, install the microtime package alongside
this one. This package will automatically detect and wrap it for you.
In the worst of cases where process.hrtime() and microtime are unavailable, the library
defaults to Date.now(), which is only accurate to the nearest millisecond. In these situations,
a process warning is emitted.
Copyright © 2017 The STDTRACE organization and ZEIT, Inc. Released under the MIT License.
Estimated unpacked size across 4 packages.
913.8 kB
Includes dependencies.