node-system-time
v0.1.1
Published
Get timestamp of current system time in nanoseconds.
Downloads
71
Maintainers
Readme
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.