sig
module type S = Timing_wheel_intf.S
type 'a t
type 'a timing_wheel = 'a t
module Alarm :
sig
type 'a t
val at : 'a timing_wheel -> 'a t -> Timing_wheel_intf.Time.t
val key : 'a timing_wheel -> 'a t -> int
val value : 'a timing_wheel -> 'a t -> 'a
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a timing_wheel Core_kernel.Invariant_intf.inv
module Level_bits :
sig
type t
val max_num_bits : int
val create_exn : int list -> t
val default : Word_size.t -> t
val num_bits : t -> int
val durations :
t ->
alarm_precision:Timing_wheel_intf.Time.Span.t ->
Timing_wheel_intf.Time.Span.t list
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
val create :
?level_bits:Level_bits.t ->
start:Timing_wheel_intf.Time.t ->
alarm_precision:Timing_wheel_intf.Time.Span.t ->
dummy:'a -> unit -> 'a timing_wheel
val alarm_precision : 'a timing_wheel -> Timing_wheel_intf.Time.Span.t
val now : 'a timing_wheel -> Timing_wheel_intf.Time.t
val start : 'a timing_wheel -> Timing_wheel_intf.Time.t
val is_empty : 'a timing_wheel -> bool
val length : 'a timing_wheel -> int
val iter : 'a timing_wheel -> f:('a Alarm.t -> unit) -> unit
val interval_start :
'a timing_wheel -> Timing_wheel_intf.Time.t -> Timing_wheel_intf.Time.t
val advance_clock :
'a timing_wheel ->
to_:Timing_wheel_intf.Time.t -> handle_fired:('a Alarm.t -> unit) -> unit
val alarm_upper_bound : 'a timing_wheel -> Timing_wheel_intf.Time.t
val add :
'a timing_wheel -> at:Timing_wheel_intf.Time.t -> 'a -> 'a Alarm.t
val remove : 'a timing_wheel -> 'a Alarm.t -> unit
val next_alarm_fires_at :
'a timing_wheel -> Timing_wheel_intf.Time.t option
module Priority_queue :
sig
type 'a t
type 'a priority_queue = 'a t
module Elt :
sig
type 'a t
val invariant :
'a priority_queue -> 'a Invariant.t -> 'a t Invariant.t
val key : 'a priority_queue -> 'a t -> int
val value : 'a priority_queue -> 'a t -> 'a
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a priority_queue Core_kernel.Invariant_intf.inv
val create :
?level_bits:Level_bits.t -> dummy:'a -> unit -> 'a priority_queue
val length : 'a priority_queue -> int
val is_empty : 'a priority_queue -> bool
val max_representable_key : int
val min_allowed_key : 'a priority_queue -> int
val max_allowed_key : 'a priority_queue -> int
val min_elt : 'a priority_queue -> 'a Elt.t option
val min_key : 'a priority_queue -> int option
val add : 'a priority_queue -> key:int -> 'a -> 'a Elt.t
val remove : 'a priority_queue -> 'a Elt.t -> unit
val increase_min_allowed_key :
'a priority_queue ->
key:int -> handle_removed:('a Elt.t -> unit) -> unit
val iter : 'a priority_queue -> f:('a Elt.t -> unit) -> unit
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a priority_queue -> Sexplib.Sexp.t
end
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a timing_wheel -> Sexplib.Sexp.t
module Debug :
functor (M : S) ->
sig
type 'a t
type 'a timing_wheel = 'a t
module Alarm :
sig
type 'a t
val at : 'a timing_wheel -> 'a t -> Timing_wheel_intf.Time.t
val key : 'a timing_wheel -> 'a t -> int
val value : 'a timing_wheel -> 'a t -> 'a
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a timing_wheel Core_kernel.Invariant_intf.inv
module Level_bits :
sig
type t
val max_num_bits : int
val create_exn : int list -> t
val default : Word_size.t -> t
val num_bits : t -> int
val durations :
t ->
alarm_precision:Timing_wheel_intf.Time.Span.t ->
Timing_wheel_intf.Time.Span.t list
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
val create :
?level_bits:Level_bits.t ->
start:Timing_wheel_intf.Time.t ->
alarm_precision:Timing_wheel_intf.Time.Span.t ->
dummy:'a -> unit -> 'a timing_wheel
val alarm_precision :
'a timing_wheel -> Timing_wheel_intf.Time.Span.t
val now : 'a timing_wheel -> Timing_wheel_intf.Time.t
val start : 'a timing_wheel -> Timing_wheel_intf.Time.t
val is_empty : 'a timing_wheel -> bool
val length : 'a timing_wheel -> int
val iter : 'a timing_wheel -> f:('a Alarm.t -> unit) -> unit
val interval_start :
'a timing_wheel ->
Timing_wheel_intf.Time.t -> Timing_wheel_intf.Time.t
val advance_clock :
'a timing_wheel ->
to_:Timing_wheel_intf.Time.t ->
handle_fired:('a Alarm.t -> unit) -> unit
val alarm_upper_bound : 'a timing_wheel -> Timing_wheel_intf.Time.t
val add :
'a timing_wheel -> at:Timing_wheel_intf.Time.t -> 'a -> 'a Alarm.t
val remove : 'a timing_wheel -> 'a Alarm.t -> unit
val next_alarm_fires_at :
'a timing_wheel -> Timing_wheel_intf.Time.t option
module Priority_queue :
sig
type 'a t
type 'a priority_queue = 'a t
module Elt :
sig
type 'a t
val invariant :
'a priority_queue -> 'a Invariant.t -> 'a t Invariant.t
val key : 'a priority_queue -> 'a t -> int
val value : 'a priority_queue -> 'a t -> 'a
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a priority_queue Core_kernel.Invariant_intf.inv
val create :
?level_bits:Level_bits.t ->
dummy:'a -> unit -> 'a priority_queue
val length : 'a priority_queue -> int
val is_empty : 'a priority_queue -> bool
val max_representable_key : int
val min_allowed_key : 'a priority_queue -> int
val max_allowed_key : 'a priority_queue -> int
val min_elt : 'a priority_queue -> 'a Elt.t option
val min_key : 'a priority_queue -> int option
val add : 'a priority_queue -> key:int -> 'a -> 'a Elt.t
val remove : 'a priority_queue -> 'a Elt.t -> unit
val increase_min_allowed_key :
'a priority_queue ->
key:int -> handle_removed:('a Elt.t -> unit) -> unit
val iter : 'a priority_queue -> f:('a Elt.t -> unit) -> unit
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a priority_queue -> Sexplib.Sexp.t
end
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a timing_wheel -> Sexplib.Sexp.t
val check_invariant : bool ref
val show_messages : bool ref
end
end