Skip to content
Myr

duration.js

This file

Path

lib/return/duration.js

8 lines · 313 bytes · JavaScript

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 9f65b86 point at it.

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 1–8why, one step back
1import {hrtime} from 'node:process';
23// Start counting time before spawning the subprocess4export const getStartTime = () => hrtime.bigint();56// Compute duration after the subprocess ended.7// Printed by the `verbose` option.8export const getDurationMs = startTime => Number(hrtime.bigint() - startTime) / 1e6;