`sig
module Time :
sig
type t = Time_ns.t
module Span :
sig
type t = Time_ns.Span.t
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val validate_lbound :
min:t Comparable_intf.bound -> t Validate.check
val validate_ubound :
max:t Comparable_intf.bound -> t Validate.check
val validate_bound :
min:t Comparable_intf.bound ->
max:t Comparable_intf.bound -> t Validate.check
val validate_positive : t Validate.check
val validate_non_negative : t Validate.check
val validate_negative : t Validate.check
val validate_non_positive : t Validate.check
val is_positive : t -> bool
val is_non_negative : t -> bool
val is_negative : t -> bool
val is_non_positive : t -> bool
val equal : t Equal.equal
val of_sec : float -> t
val scale : t -> float -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t Equal.equal
val epoch : t
val add : t -> Span.t -> t
val sub : t -> Span.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
type 'a timing_wheel = 'a t
type 'a t_now = 'a t
module Interval_num : Timing_wheel_intf.Interval_num
module Alarm :
sig
type 'a t
val null : unit -> 'a t
val at : 'a timing_wheel -> 'a t -> Time.t
val interval_num : 'a timing_wheel -> 'a t -> Interval_num.t
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 Invariant_intf.inv -> 'a t Invariant_intf.inv
module Level_bits :
sig
type t
val invariant : t Invariant_intf.inv
val max_num_bits : int
val create_exn : int list -> t
val default : t
val num_bits : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Config :
sig
type t
val invariant : t Invariant_intf.inv
val create :
?alarm_precision:Time.Span.t -> ?level_bits:Level_bits.t -> unit -> t
val alarm_precision : t -> Time.Span.t
val level_bits : t -> Level_bits.t
val default : t
val durations : t -> Time.Span.t list
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
val create : config:Config.t -> start:Time.t -> 'a t
val alarm_precision : 'a t -> Time.Span.t
val now : 'a t -> Time.t
val start : 'a t -> Time.t
val is_empty : 'a t -> bool
val length : 'a t -> int
val iter : 'a t -> f:('a Alarm.t -> unit) -> unit
val interval_num : 'a t -> Time.t -> Interval_num.t
val now_interval_num : 'a t -> Interval_num.t
val interval_num_start : 'a t -> Interval_num.t -> Time.t
val interval_start : 'a t -> Time.t -> Time.t
val advance_clock :
'a t -> to_:Time.t -> handle_fired:('a Alarm.t -> unit) -> unit
val fire_past_alarms : 'a t -> handle_fired:('a Alarm.t -> unit) -> unit
val alarm_upper_bound : 'a t -> Time.t
val add : 'a t -> at:Time.t -> 'a -> 'a Alarm.t
val add_at_interval_num : 'a t -> at:Interval_num.t -> 'a -> 'a Alarm.t
val mem : 'a t -> 'a Alarm.t -> bool
val remove : 'a t -> 'a Alarm.t -> unit
val reschedule : 'a t -> 'a Alarm.t -> at:Time.t -> unit
val reschedule_at_interval_num :
'a t -> 'a Alarm.t -> at:Interval_num.t -> unit
val clear : 'a t -> unit
val next_alarm_fires_at : 'a t -> Time.t option
module Priority_queue :
sig
type 'a t
type 'a priority_queue = 'a t
module Key : Timing_wheel_intf.Interval_num
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 -> Key.t
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 Invariant_intf.inv -> 'a t Invariant_intf.inv
val create : ?level_bits:Level_bits.t -> unit -> 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val min_allowed_key : 'a t -> Key.t
val max_allowed_key : 'a t -> Key.t
val min_elt : 'a t -> 'a Elt.t option
val min_key : 'a t -> Key.t option
val add : 'a t -> key:Key.t -> 'a -> 'a Elt.t
val remove : 'a t -> 'a Elt.t -> unit
val change_key : 'a t -> 'a Elt.t -> key:Key.t -> unit
val clear : 'a t -> unit
val mem : 'a t -> 'a Elt.t -> bool
val increase_min_allowed_key :
'a t -> key:Key.t -> handle_removed:('a Elt.t -> unit) -> unit
val iter : 'a t -> f:('a Elt.t -> unit) -> unit
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val sexp_of_t_now : ('a -> Sexplib.Sexp.t) -> 'a t_now -> Sexplib.Sexp.t
end`