This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
2020-09-09 12:25:00 +00:00
|
|
|
// return the time between start and now in milliseconds
|
2020-09-09 12:53:05 +00:00
|
|
|
function calculateElapsedTime(start) {
|
2020-09-09 12:25:00 +00:00
|
|
|
const diff = process.hrtime(start);
|
|
|
|
|
|
|
|
return Math.round((diff[0] * 1e9 + diff[1]) / 1e6); // msec
|
|
|
|
}
|
|
|
|
|
2020-09-09 12:53:05 +00:00
|
|
|
module.exports = { calculateElapsedTime };
|