package progress

  1. Overview
  2. Docs
type t = Mtime.Span.t

The type of time durations. This module is just a convenience wrapper around Mtime.Span.

val equal : t -> t -> bool
val compare : t -> t -> int

Round values

val zero : t
val nanosecond : t
val microsecond : t
val millisecond : t
val second : t
val minute : t
val hour : t
val day : t

Convertors

val of_ns : float -> t
val of_us : float -> t
val of_ms : float -> t
val of_sec : float -> t
val of_min : float -> t
val of_hour : float -> t
val of_day : float -> t

From integers

val of_int_ms : int -> t
val of_int_sec : int -> t
val of_int_min : int -> t
val of_int_hour : int -> t
val of_int64_ms : int64 -> t
val of_int64_sec : int64 -> t
module Of_int : sig ... end

Infix operators

val (+) : t -> t -> t
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>=) : t -> t -> bool
val (>) : t -> t -> bool
OCaml

Innovation. Community. Security.