UNPKG

@shopify/cli-kit

Version:

A set of utilities, interfaces, and models that are common across all the platform features

19 lines 571 B
/** * Returns the current high-resolution real time in a [seconds, nanoseconds] tuple Array. * * @returns The current high-resolution real time. */ export function startHRTime() { return process.hrtime(); } /** * Given a start time tuple, it returns the end time string with the time in miliseconds. * * @param startTime - Time tuple. * @returns Time in miliseconds. */ export function endHRTimeInMs(startTime) { const endTime = process.hrtime(startTime); return (endTime[0] * 1000 + endTime[1] / 1e6).toFixed(2); } //# sourceMappingURL=hrtime.js.map