rep: fix duration rounding

pull/2851/head
Rob Pilling 2023-06-29 21:19:49 +01:00
parent 76a60d6ae3
commit 08dc1caa93
1 changed files with 2 additions and 2 deletions

View File

@ -249,8 +249,8 @@ const emptyLabel = (id: string) => {
const pad2 = (s: number) => ('0' + s.toFixed(0)).slice(-2);
const msToMinSec = (ms: number) => {
const sec = Math.round(ms / 1000);
const min = Math.round(sec / 60);
const sec = Math.floor(ms / 1000);
const min = Math.floor(sec / 60);
return min.toFixed(0) + ":" + pad2(sec % 60);
};