package octez-libs

  1. Overview
  2. Docs

Module for time duration

include Tezos_stdlib.Compare.S with type t = C.Time.span
type t = C.Time.span
val (=) : t -> t -> bool

x = y iff compare x y = 0

val (<>) : t -> t -> bool

x <> y iff compare x y <> 0

val (<) : t -> t -> bool

x < y iff compare x y < 0

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

x <= y iff compare x y <= 0

val (>=) : t -> t -> bool

x >= y iff compare x y >= 0

val (>) : t -> t -> bool

x > y iff compare x y > 0

val compare : t -> t -> int

compare an alias for the functor parameter's compare function

val equal : t -> t -> bool

equal x y iff compare x y = 0

val max : t -> t -> t

max x y is x if x >= y otherwise it is y

val min : t -> t -> t

min x y is x if x <= y otherwise it is y

include Tezos_base.TzPervasives.PRINTABLE with type t := t
val pp : Format.formatter -> t -> unit
val zero : t
val of_int_s : int -> t
val to_int_s : t -> int
val of_float_s : float -> t
val to_float_s : t -> float
val mul : t -> int -> t

mul s n returns n * s.

OCaml

Innovation. Community. Security.