# fmtTime

Function

Source: https://github.com/playcanvas/splat-transform/blob/b6424a5b3b929695fbaafe738a995adb1240d675/src/lib/utils/fmt.ts#L11

```ts
fmtTime(ms: number): string
```

Format a duration in milliseconds as a human-readable string.

- Sub-minute durations render in seconds (e.g. `1.234s`).
- Sub-hour durations render as `MmS.SSSs`.
- Otherwise as `HhMmS.SSSs`.

**Parameters**

- `ms` (`number`): The duration in milliseconds.

**Returns** `string`: The formatted string.
