0.1.1 • Published 10 months ago

node-system-time v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

node-system-time

Get timestamp of current system time in nanoseconds.

Dependency

You need to install Python3 first to use node-addon-api.

Installation

npm install node-system-time

Features

  • Support Linux and Windows. (Testing in progress)
  • Get timestamp in nanoseconds.
  • Return timestamp as BigInt type.

Quick Start

Install package use below command.

npm install node-system-time

Copy and paste below example code to file like main.js

const systemTime = require("node-system-time");
console.log(systemTime.getTimestamp());

Execute main.js and get current system timestamp.

user@server:~$ node main.js 
1726826333990371143n

Mechanism

Call uv_clock_gettime function of libuv multi-platform C library using node-addon-api.

Licence

MIT

0.1.1

10 months ago

0.1.0

10 months ago