package timere

  1. Overview
  2. Docs
type t = private {
  1. days : int;
  2. hours : int;
  3. minutes : int;
  4. seconds : int;
  5. ns : int;
}

Unsigned/scalar magnitude of a period of time

Conversion to and from Span.t is lossless, but cannot convert from negative span

val make : ?days:int -> ?hours:int -> ?minutes:int -> ?seconds:int -> ?ns:int -> unit -> t
val make_frac : ?days:float -> ?hours:float -> ?minutes:float -> ?seconds:float -> ?ns:int -> unit -> t
val zero : t
val equal : t -> t -> bool
val of_span : Span.t -> t
val to_span : t -> Span.t
val to_string : t -> string
val pp : Format.formatter -> t -> unit
val to_sexp : t -> CCSexp.t
val to_sexp_string : t -> string
val of_sexp : CCSexp.t -> (t, string) result
val of_sexp_string : string -> (t, string) result
val pp_sexp : Format.formatter -> t -> unit
OCaml

Innovation. Community. Security.