From 08dc1caa9387a5aea94d1bef2ed37be4882f5bd9 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Thu, 29 Jun 2023 21:19:49 +0100 Subject: [PATCH] rep: fix duration rounding --- apps/rep/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/rep/app.ts b/apps/rep/app.ts index 0471febf9..91ffbd010 100644 --- a/apps/rep/app.ts +++ b/apps/rep/app.ts @@ -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); };