ligo/lib_embedded_protocol_alpha/src/period_repr.mli
Grégoire Henry 9cb498eee6 Jbuilder: Move alpha/genesis/demo in their own two OPAM packages
One package for the embedded version. One for the functorized one.
2017-12-04 16:05:54 +01:00

31 lines
1.1 KiB
OCaml

(**************************************************************************)
(* *)
(* Copyright (c) 2014 - 2017. *)
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* All rights reserved. No warranty, explicit or implicit, provided. *)
(* *)
(**************************************************************************)
type t
type period = t
include Compare.S with type t := t
val encoding : period Data_encoding.t
val pp: Format.formatter -> period -> unit
val to_seconds : period -> int64
(** [of_second period] fails if period is not positive *)
val of_seconds : int64 -> period tzresult
(** [of_second period] fails if period is not positive.
It should only be used at toplevel for constants. *)
val of_seconds_exn : int64 -> period
val mult : int32 -> period -> period tzresult
val one_second : period
val one_minute : period
val one_hour : period