Files
med-notes/.pnpm-store/v10/files/2f/89c035070e1062278ebe24896fdb772002f64e3e280a1ea575a6458cd0fb9998689716660b9bb0dbca9c4a3b11937eaf4d9e3c386a52e824b817ac935963ea
2025-05-09 05:30:08 +02:00

31 lines
638 B
Plaintext

/**
* @fileoverview Provides helper functions to start/stop the time measurements
* that are provided by the ESLint 'stats' option.
* @author Mara Kiefer <http://github.com/mnkiefer>
*/
"use strict";
/**
* Start time measurement
* @returns {[number, number]} t variable for tracking time
*/
function startTime() {
return process.hrtime();
}
/**
* End time measurement
* @param {[number, number]} t Variable for tracking time
* @returns {number} The measured time in milliseconds
*/
function endTime(t) {
const time = process.hrtime(t);
return time[0] * 1e3 + time[1] / 1e6;
}
module.exports = {
startTime,
endTime,
};