ligo/src/proto/alpha/period_repr.mli

31 lines
1.1 KiB
OCaml
Raw Normal View History

2016-09-08 21:13:10 +04:00
(**************************************************************************)
(* *)
(* Copyright (c) 2014 - 2016. *)
(* 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