
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
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.
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();
The hrtime package offers high-resolution time measurements similar to nano-time, but it mimics the process.hrtime() method available in Node.js. Unlike nano-time, hrtime provides time in seconds and nanoseconds as a tuple, which can be more convenient for certain applications.
This package provides a way to get high-resolution timestamps in milliseconds, similar to window.performance.now() in the browser. While it offers high precision, it's limited to millisecond resolution, making nano-time more suitable for applications requiring nanosecond precision.
FAQs
Current Time in Nanoseconds
We found that nano-time demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.