Explorar o código

fix: workflow log duration (#1246)

Ahmad Kholid hai 1 ano
pai
achega
a11af70e74
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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}` : '');