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 -> Time.t
        val key : 'a timing_wheel -> 'a t -> int
        val value : 'a timing_wheel -> 'a t -> 'a
        val sexp_of_t : ('-> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
      end
    val invariant :
      '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:Time.Span.t -> 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:Time.t ->
      alarm_precision:Time.Span.t -> dummy:'-> unit -> 'a timing_wheel
    val alarm_precision : 'a timing_wheel -> Time.Span.t
    val now : 'a timing_wheel -> Time.t
    val start : 'a timing_wheel -> Time.t
    val is_empty : 'a timing_wheel -> bool
    val length : 'a timing_wheel -> int
    val iter : 'a timing_wheel -> f:('Alarm.t -> unit) -> unit
    val interval_start : 'a timing_wheel -> Time.t -> Time.t
    val advance_clock :
      'a timing_wheel ->
      to_:Time.t -> handle_fired:('Alarm.t -> unit) -> unit
    val alarm_upper_bound : 'a timing_wheel -> Time.t
    val add : 'a timing_wheel -> at:Time.t -> '-> 'Alarm.t
    val remove : 'a timing_wheel -> 'Alarm.t -> unit
    val next_alarm_fires_at : 'a timing_wheel -> 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 -> '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 : ('-> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
          end
        val invariant :
          'Core_kernel.Invariant_intf.inv ->
          'a priority_queue Core_kernel.Invariant_intf.inv
        val create :
          ?level_bits:Level_bits.t -> dummy:'-> 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 -> 'Elt.t option
        val min_key : 'a priority_queue -> int option
        val add : 'a priority_queue -> key:int -> '-> 'Elt.t
        val remove : 'a priority_queue -> 'Elt.t -> unit
        val increase_min_allowed_key :
          'a priority_queue ->
          key:int -> handle_removed:('Elt.t -> unit) -> unit
        val iter : 'a priority_queue -> f:('Elt.t -> unit) -> unit
        val sexp_of_t :
          ('-> Sexplib.Sexp.t) -> 'a priority_queue -> Sexplib.Sexp.t
      end
    val sexp_of_t :
      ('-> Sexplib.Sexp.t) -> 'a timing_wheel -> Sexplib.Sexp.t
    val check_invariant : bool Pervasives.ref
    val show_messages : bool Pervasives.ref
  end