mirror of
https://github.com/siddharthvaddem/openscreen.git
synced 2026-11-06 01:33:16 +08:00
8 lines
201 B
TypeScript
8 lines
201 B
TypeScript
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}`;
|
|
}
|