package progress

  1. Overview
  2. Docs

Module Progress_unixSource

This module defines Unix-specific extensions to the Progress library.

It is packaged as the Dune library progress.unix.

Time-sensitive segments

Sourceval stopwatch : unit -> 'a Progress.Segment.t

Displays the time for which the bar has been rendering in MM:SS form.

Sourceval counter : total:int64 -> ?mode:[ `ASCII | `UTF8 ] -> ?message:string -> ?pp:(int64, int64 Progress.Segment.t) Progress.Units.pp_fixed -> ?width:int -> ?sampling_interval:int -> unit -> (int64 -> unit) Progress.t

counter ~total () is a progress bar of the form:

  <message?>  <count?>  MM:SS  [########..............................]  XX%

This is an equivalent of Progress.counter with an extra stopwatch segment.

TTY-sensitive renderers

Sourceval stderr_if_tty : Format.formatter

A formatter that is equal to Format.err_formatter if stdout is a TTY, and is a noop formatter otherwise.

Renderers that use stderr_if_tty as an output formatter.

Sourceval with_reporters : 'a Progress.t -> ('a -> 'b) -> 'b
Sourceval start : 'a Progress.t -> 'a * Progress.display
Sourceval finalise : Progress.display -> unit

Re-exports

Convenient aliases to functions defined in Progress.

Sourceval (/) : 'a Progress.t -> 'b Progress.t -> ('a * 'b) Progress.t
OCaml

Innovation. Community. Security.