/ archiveofbelonging.org / back / node_modules / nano-time /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[TXT]README.md8 years ago583 f12eb36 documentaiton updates [كارل مبارك]
[   ]index.js8 years ago470  
[   ]package.json2 years ago1.4K7375cab EXHIBTION: fix overflow ellipsis cutoff [كارل مبارك]
README.md

NanoTime

Gets the current time in nanoseconds or microseconds.

In node.js you can get high resolution time with process.hrtime(), but it is from an unknown relative time, not epoch. So this library helps that by calculating the difference and adding it to the current time.

Usage

Since javascript can't hold a nanosecond as an INT safely (Number.MAX_SAFE_INTEGER), we return a string instead.

const now = require('nano-time');

now(); // '1476742925219947761' (returns a string)
now.micro(); // '1476742921398373'
now.microseconds(); // alias for now.micro();
Apache/2.4.38 (Debian) Server at www.karls.computer Port 80