Progress.UnitsSourceHelpers for printing values of various units.
type 'a pp := Format.formatter -> 'a -> unitA fixed-width pretty printer. Intended to be used to create progress bar segments, e.g. bytes Segment.of_pp is a segment that pretty-prints values as byte counts.
Prints a 64-bit integer as a byte count. e.g.
0L ↦ " 0.0 B "
999L ↦ " 999.0 B "
1024L ↦ " 1.0 KiB"
1024L * 1023L ↦ "1023.0 KiB"
1024L * 1024L - 1L ↦ "1023.9 KiB"Prints a proportion as a percentage. e.g.
0. ↦ " 0%"
0.42 ↦ " 42%"
0.9999 ↦ " 99%"
1. ↦ "100%"Note: values will be clamped into the range [0., 1.].
Renders a time span in fixed-width MM:SS form.