Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lianghx-319/microtime-rs

Get the current time in microseconds(Rust version)
https://github.com/lianghx-319/microtime-rs

Last synced: about 22 hours ago
JSON representation

Get the current time in microseconds(Rust version)

Awesome Lists containing this project

README

        

# @microtime-rs/node

[![npm](https://img.shields.io/npm/dm/@microtime-rs/node.svg)](https://www.npmjs.com/package/@microtime-rs/node)
[![npm](https://img.shields.io/npm/v/@microtime-rs/node.svg)](https://www.npmjs.com/package/@microtime-rs/node)

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