cspell
Version: 
A Spelling Checker for Code!
11 lines • 351 B
JavaScript
export function getTimeMeasurer() {
    const start = process.hrtime();
    return () => hrTimeToMs(process.hrtime(start));
}
export function elapsedTimeMsFrom(relativeTo) {
    return hrTimeToMs(process.hrtime(relativeTo));
}
export function hrTimeToMs(hrTime) {
    return hrTime[0] * 1.0e3 + hrTime[1] * 1.0e-6;
}
//# sourceMappingURL=timer.mjs.map