diff --git a/client/plugins/init.client.js b/client/plugins/init.client.js index 4a5dc643..e69f7f69 100644 --- a/client/plugins/init.client.js +++ b/client/plugins/init.client.js @@ -41,6 +41,9 @@ Vue.prototype.$bytesPretty = (bytes, decimals = 2) => { } Vue.prototype.$elapsedPretty = (seconds) => { + if (seconds < 60) { + return `${Math.floor(seconds)} sec` + } var minutes = Math.floor(seconds / 60) if (minutes < 70) { return `${minutes} min` diff --git a/server/utils/index.js b/server/utils/index.js index 2f1ac3d1..5691277c 100644 --- a/server/utils/index.js +++ b/server/utils/index.js @@ -64,6 +64,9 @@ module.exports.getId = (prepend = '') => { } function elapsedPretty(seconds) { + if (seconds < 60) { + return `${Math.floor(seconds)} sec` + } var minutes = Math.floor(seconds / 60) if (minutes < 70) { return `${minutes} min`