Socket
Socket
Sign inDemoInstall

convert-hrtime

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    convert-hrtime

Convert the result of `process.hrtime.bigint()` to seconds, milliseconds, nanoseconds


Version published
Weekly downloads
1.2M
decreased by-0.53%
Maintainers
1
Install size
4.32 kB
Created
Weekly downloads
 

Readme

Source

convert-hrtime

Convert the result of process.hrtime.bigint() to seconds, milliseconds, nanoseconds

Install

$ npm install convert-hrtime

Usage

import convertHrtime from 'convert-hrtime';

const startTime = process.hrtime.bigint();
expensiveCalculation();
const diff = process.hrtime.bigint() - startTime;

convertHrtime(diff);
//=> {seconds: 0.000002399, milliseconds: 0.002399, nanoseconds: 2399n}

Keywords

FAQs

Last updated on 14 Apr 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc