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

@types/pretty-hrtime

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/pretty-hrtime

TypeScript definitions for pretty-hrtime

  • 1.0.3
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3M
decreased by-14.38%
Maintainers
1
Weekly downloads
 
Created

What is @types/pretty-hrtime?

@types/pretty-hrtime is a TypeScript type definition package for the pretty-hrtime library, which is used to convert high-resolution time (hrtime) to a human-readable format.

What are @types/pretty-hrtime's main functionalities?

Formatting High-Resolution Time

This feature allows you to format high-resolution time (hrtime) into a human-readable string. The code sample demonstrates how to measure the time taken for a task and then format it using pretty-hrtime.

const prettyHrtime = require('pretty-hrtime');
const start = process.hrtime();
// do some work
const end = process.hrtime(start);
console.log(prettyHrtime(end));

Verbose Formatting

This feature provides a more verbose output for the formatted high-resolution time. The code sample shows how to enable verbose formatting to get a more detailed human-readable string.

const prettyHrtime = require('pretty-hrtime');
const start = process.hrtime();
// do some work
const end = process.hrtime(start);
console.log(prettyHrtime(end, { verbose: true }));

Precise Formatting

This feature allows for precise formatting of the high-resolution time, showing more decimal places. The code sample demonstrates how to enable precise formatting for a more accurate human-readable string.

const prettyHrtime = require('pretty-hrtime');
const start = process.hrtime();
// do some work
const end = process.hrtime(start);
console.log(prettyHrtime(end, { precise: true }));

Other packages similar to @types/pretty-hrtime

FAQs

Package last updated on 07 Nov 2023

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