package octez-libs
val display_progress :
?refresh_rate:(int * int) ->
((('a, Format.formatter, unit, unit) format4 -> 'a) -> unit) ->
unit
Print over the current stdout
line. Takes a message formatting function of the form (fun m -> m <format_string>)
. Message formatting occurs only when the line is actually printed (i.e. when (fst refresh_rate) mod (snd
refresh_rate) = 0
). refresh_rate
defaults to always printing the supplied message.
Examples:
display_progress (fun m -> m "Loading... %d/100" percent)
.
display_progress ~refresh_rate:(index, 1000) (fun m -> m "Written %d bytes" total)
. Display progress message whenindex
is divisible by 1000.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>