UNPKG

crypt-uniid

Version:

A secure, efficient, and machine-aware unique ID generator using timestamp, counter, and SHA-256 hashing.

9 lines (7 loc) 243 B
function getFullTimeInNs() { const currentTime = Date.now() * 1e6; const passTime = process.hrtime(); const hrtimeInNs = (passTime[0] * 1e9) + passTime[1]; return (currentTime + hrtimeInNs) } module.exports = getFullTimeInNs;