Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

refactor: added timeUtils

Prayas Lashkari948e2b1e4a90
diff --git a/src/utils/timeUtils.ts b/src/utils/timeUtils.ts
new file mode 100644
index 000000000..b56fb2ada
--- /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}`;
+}