Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nano-time

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nano-time

Current Time in Nanoseconds

  • 1.0.0
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1M
decreased by-21.61%
Maintainers
1
Weekly downloads
 
Created

What is nano-time?

The nano-time npm package provides high-resolution time stamps based on the Unix epoch. It allows for the generation of nanosecond precision time stamps, which are particularly useful in performance measurement, logging, and other scenarios where more granularity than milliseconds is required.

What are nano-time's main functionalities?

Getting the current time in nanoseconds

This feature allows you to get the current time in nanoseconds since the Unix epoch. It's useful for high-precision time measurements.

const nanoTime = require('nano-time');
let currentTime = nanoTime.now();

Converting a Date object to nanoseconds

This feature converts a JavaScript Date object to a nanosecond precision timestamp. It's useful for when you need to work with both standard JavaScript dates and high-resolution timestamps.

const nanoTime = require('nano-time');
let date = new Date();
let nanoSeconds = nanoTime.fromDate(date);

Other packages similar to nano-time

Keywords

FAQs

Package last updated on 17 Oct 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc