Skip to content

k0michi/napi-now

Repository files navigation

@k0michi/now

@k0michi/now provides a function to get the current UNIX time in nanoseconds, using NAPI-RS.

This module relies on Rust's std::time::SystemTime::now().

Installation

npm install @k0michi/now
yarn add @k0michi/now

Usage

import { now } from '@k0michi/now';

console.log(now());
// 1667912108734934000n

Known issue

  • The resolution is microsecond on macOS

License

MIT

About

Get the current UNIX time in nanoseconds on Node.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published