JSPM

node-system-time

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q23582F
  • License MIT

Get timestamp of current system time in nanoseconds.

Package Exports

  • node-system-time
  • node-system-time/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-system-time) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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.

Licence

MIT