
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
@dnlup/hrtime-utils
Advanced tools
A small collection of useful functions to work with Node.js `process.hrtime` values
A small collection of useful functions to work with Node.js
process.hrtime
values.
hrtime-utils
is a tiny module that exports a few useful functions that you can use to convert the value returned from process.hrtime()
to a time unit.
$ npm i @dnlup/hrtime-utils
const {
hrtime2ns,
hrtime2us,
hrtime2ms,
hrtime2
} = require('@dnlup/hrtime-utils')
const time = process.hrtime()
hrtime2ns(time) // time in nanoseconds
hrtime2us(time) // time in microseconds
hrtime2ms(time) // time in milliseconds
hrtime2s(time) // time in seconds
const delta = process.hrtime(time)
hrtime2ns(delta) // delta in nanoseconds
hrtime2us(delta) // delta in microseconds
hrtime2ms(delta) // delta in milliseconds
hrtime2s(delta) // delta in seconds
time
<integer[]
> The return value of a process.hrtime()
call
Returns <number>
This function converts time
to nanoseconds.
time
<integer[]
> The return value of a process.hrtime()
call
Returns <number>
This function converts time
to microseconds.
time
<integer[]
> The return value of a process.hrtime()
call
Returns <number>
This function converts time
to milliseconds.
time
<integer[]
> The return value of a process.hrtime()
call
Returns <number>
This function converts time
to seconds.
FAQs
A small collection of useful functions to work with Node.js `process.hrtime` values
The npm package @dnlup/hrtime-utils receives a total of 1,102 weekly downloads. As such, @dnlup/hrtime-utils popularity was classified as popular.
We found that @dnlup/hrtime-utils 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.