package progress
User-definable progress bars
Install
Dune Dependency
Authors
Maintainers
Sources
progress-0.1.1.tbz
sha256=90c6bec19d014a4c6b0b67006f08bdfcf36981d2176769bebe0ccd75d6785a32
sha512=76a8a8f5979c1d6ba47d28e8c8fc6fa2c4f27073f77749b98f98eaf9c101fdc0f9f76e6463ea8dbea5dbbc69a105908be26c605c8c56ddc1a1a5ccc48db87a5a
doc/src/progress.unix/progress_unix.ml.html
Source file progress_unix.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
let stopwatch () = Progress.Segment.stateful (fun () -> let start_time = Mtime_clock.counter () in Progress.Units.seconds (fun ~width pp_time -> let pp ppf = pp_time ppf (Mtime_clock.count start_time) in Progress.Segment.const_fmt ~width pp)) let counter = Progress.Internal.counter ~prebar:(stopwatch ()) let stderr_if_tty = if Unix.(isatty stderr) then Format.err_formatter else Format.make_formatter (fun _ _ _ -> ()) (fun () -> ()) let with_reporters x = Progress.with_reporters ~ppf:stderr_if_tty x let start x = Progress.start ~ppf:stderr_if_tty x let finalise = Progress.finalise let ( / ) = Progress.( / )
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>