@microtime-rs/node
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@microtime-rs/node

npm npm

Date.now() will only give you accuracy in milliseconds. This module calls gettimeofday(2) to get the time in microseconds and provides it in a few different formats. The same warning from that function applies: The resolution of the system clock is hardware dependent, and the time may be updated continuously or in ``ticks.''

Installation

npm install @microtime-rs/node

Usage

microtime.now()

Get the current time in microseconds as an integer.

Example

> var microtime = require('microtime')
> microtime.now()
1297448895297028
<!-- > microtime.nowDouble()
1297448897.600976
> microtime.nowStruct()
[ 1297448902, 753875 ] -->

Package Sidebar

Install

npm i @microtime-rs/node

Weekly Downloads

5

Version

1.0.0

License

MIT

Unpacked Size

83.8 MB

Total Files

480

Last publish

Collaborators

  • llhan