Skip to content

formatDuration

formatDuration(seconds): string

Defined in: console-sdk/src/units/index.ts:603

Formats a duration in seconds as a clock string — M:SS, or H:MM:SS once it reaches an hour (SDK_PLAN.md §3.6.9). Generic and locale-neutral: negatives and fractions floor to whole seconds and 0 renders 0:00. Pairs with formatPace / formatPaceTime for workout headers, elapsed clocks and split rows — the ubiquitous duration string every workout UI needs. (Unlike pace, a duration carries no firmware-parity quirk; it is plain clock arithmetic, which is why it can live here without a console model.)

number

string