package core

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
val compare : t -> t -> Base.Int.t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
include Base.Equal.S with type t := t
val equal : t Base.Equal.equal
  • deprecated [since 2018-01] Use [of_span_floor_pow2_ns]
val of_span_floor_pow2_ns : Timing_wheel_float.Time.Span.t -> t

of_span_floor_pow2_ns span returns the largest alarm precision less than or equal to span that is a power of two number of nanoseconds.

val one_nanosecond : t
val about_one_day : t

Constants that are the closest power of two number of nanoseconds to the stated span.

val about_one_microsecond : t
val about_one_millisecond : t
val about_one_second : t
val mul : t -> pow2:Base.Int.t -> t

mul t ~pow2 is t * 2^pow2. pow2 may be negative, but mul does not check for overflow or underflow.

val div : t -> pow2:Base.Int.t -> t

div t ~pow2 is t / 2^pow2. pow2 may be negative, but div does not check for overflow or underflow.

module Unstable : sig ... end

The unstable bin and sexp format is that of Time_ns.Span, with the caveat that deserialization implicitly floors the time span to the nearest power of two nanoseconds. This ensures that the alarm precision that is used is at least as precise than the alarm precision that is stated.