zowe-utils
Version:
z/OS : JCL submission and common ftp operations, for NodeJS developers (ZOWE).
7 lines (6 loc) • 325 B
JavaScript
module.exports = (hrstart) => {
const hrend = process.hrtime(hrstart)
const executionMins = Math.trunc(hrend[0] / 60).toFixed(0)
const executionSecs = (hrend[0] % 60).toFixed(0)
console.log(`${executionMins} minute${executionMins === '1' ? '' : 's'} and ${executionSecs} second${executionSecs === '1' ? '' : 's'}`)
}