diff --git a/src/utils/timeUtils.ts b/src/utils/timeUtils.ts new file mode 100644 index 0000000..b56fb2a --- /dev/null +++ b/src/utils/timeUtils.ts @@ -0,0 +1,7 @@ +export function formatTimePadded(seconds: number) { + const m = Math.floor(seconds / 60) + .toString() + .padStart(2, "0"); + const s = (seconds % 60).toString().padStart(2, "0"); + return `${m}:${s}`; +}