Browse Source

fix: workflow log duration (#1246)

Ahmad Kholid 1 year ago
parent
commit
a11af70e74
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/utils/helper.js

+ 2 - 2
src/utils/helper.js

@@ -211,8 +211,8 @@ export function fileSaver(filename, data) {
 
 export function countDuration(started, ended) {
   const duration = Math.round((ended - started) / 1000);
-  const minutes = parseInt((duration / 60) % 60, 10);
-  const seconds = parseInt(duration % 60, 10);
+  const minutes = Math.floor(duration / 60);
+  const seconds = Math.floor(duration % 60);
 
   const getText = (num, suffix) => (num > 0 ? `${num}${suffix}` : '');