Module Note_brr_kit.Time
Monotonic time.
Time span
Passing time
val elapsed : unit -> Note_brr_kit.Time.spanelapsed () is the number of seconds elapsed since the beginning of the program.
Tick events
val tick : Note_brr_kit.Time.span -> Note_brr_kit.Time.span Note.eventtick span is an event that occurs once in span seconds with the value span - span' where span' is the actual delay performed by the system.
Note. Since the system may introduce delays you cannot assume that two different calls to tick will necessarily yield two non-simultaneous events.
val delay : Note_brr_kit.Time.span -> (unit -> unit) -> unitdelay span f calls f after span seconds.
Counters
val counter : unit -> Note_brr_kit.Time.countercounter () is a counter counting time from call time on.
val counter_value : Note_brr_kit.Time.counter -> Note_brr_kit.Time.spancounter_value c is the current counter value in seconds.
Pretty printing time
val to_jstr : [ `S | `Ms | `Mus ] -> Note_brr_kit.Time.span -> Jstr.t