package core_kernel

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Timing_wheel.ConfigSource

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

create raises if alarm_precision <= 0.

Sourceval alarm_precision : t -> Core.Time_ns.Span.t

accessors

Sourceval level_bits : t -> Level_bits.t
Sourceval durations : t -> Core.Time_ns.Span.t list

durations t returns the durations of the levels in t

Sourceval 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_test library.