duration.js
This file
Path
lib/return/duration.js
5 lines · 175 bytes · JavaScript
Last changed by
Add `result|error.durationMs` (#896)ehmickybefore adoption7088091
History of this fileTake it
123456import {hrtime} from 'node:process';
export const getStartTime = () => hrtime.bigint();
export const getDurationMs = startTime => Number(hrtime.bigint() - startTime) / 1e6;