Module Timing_wheel.Config

type t
include Ppx_sexp_conv_lib.Sexpable.S with type t := t
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
include Core_kernel.Invariant.S with type t := t
val invariant : t -> unit
val create : ?capacity:int -> ?level_bits:Level_bits.t -> alarm_precision:Alarm_precision.t -> unit -> t

create raises if alarm_precision <= 0.

val alarm_precision : t -> Core_kernel.Time_ns.Span.t

accessors

val level_bits : t -> Level_bits.t
val durations : t -> Core_kernel.Time_ns.Span.t list

durations t returns the durations of the levels in t

val microsecond_precision : unit -> t

microsecond_precision () returns a reasonable configuration for a timing wheel with microsecond alarm_precision, and level durations of 1ms, 1s, 1m, 1h, 1d. See the relevant expect test in Core_kernel_test library.