Skip to main content

Module duration

Module duration 

Source
Expand description

Human-readable Duration formatting for the per-task summary lines and the run-level epilogue.

The grammar picks the two coarsest magnitudes that fit:

DurationRendered as
< 1s176ms
< 1m7s 856ms
< 1h1m 23s
>= 1h1h 23m

Sub-millisecond durations round to the nearest millisecond (clamping at 1ms so a sub-millisecond run does not display as 0ms). The grammar deliberately drops fractional digits; readers want order-of-magnitude information, not microsecond precision.

Functionsยง

format_duration
Render duration in the grammar described at the module level. Allocates a single String.