diff --git a/libs/basic/utils.js b/libs/basic/utils.js index 73bff949..5b0a1ff0 100644 --- a/libs/basic/utils.js +++ b/libs/basic/utils.js @@ -222,6 +222,9 @@ module.exports = (processCwd,config) => { return s; } + function roundNearest5(num) { + return Math.round(num / 5) * 5; + } return { parseJSON: parseJSON, stringJSON: stringJSON, @@ -242,5 +245,6 @@ module.exports = (processCwd,config) => { asyncSetTimeout: asyncSetTimeout, copyFile: copyFile, hmsToSeconds, + roundNearest5, } }