소스 검색

fix: workflow log duration (#1246)

Ahmad Kholid 1 년 전
부모
커밋
a11af70e74
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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}` : '');