package tezos-protocol-alpha

  1. Overview
  2. Docs
Tezos protocol alpha package

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-18.1.tar.gz
sha256=aa2f5bc99cc4ca2217c52a1af2a2cdfd3b383208cb859ca2e79ca0903396ca1d
sha512=d68bb3eb615e3dcccc845fddfc9901c95b3c6dc8e105e39522ce97637b1308a7fa7aa1d271351d5933febd7476b2819e1694f31198f1f0919681f1f9cc97cb3a

doc/tezos_raw_protocol_alpha/Tezos_raw_protocol_alpha/Time_repr/index.html

Module Tezos_raw_protocol_alpha.Time_reprSource

include module type of struct include Tezos_protocol_environment_alpha.Time end
type t = Tezos_base.TzPervasives.Time.Protocol.t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
val (>=) : t -> t -> bool
val (>) : t -> t -> bool
val compare : t -> t -> int
val equal : t -> t -> bool
val max : t -> t -> t
val min : t -> t -> t
val add : t -> int64 -> t
val diff : t -> t -> int64
val of_seconds : int64 -> t
val to_seconds : t -> int64
val of_notation : string -> t option
val of_notation_exn : string -> t
val to_notation : t -> string
Sourcetype time = t

Internal timestamp representation.

Pretty-prints the time stamp using RFC3339 format.

Sourceval of_seconds_string : string -> time option

Parses RFC3339 representation and returns a timestamp.

Sourceval to_seconds_string : time -> string

Returns the timestamp encoded in RFC3339 format.

Adds a time span to a timestamp. This function fails on integer overflow

Returns the difference between two timestamps as a time span. This function fails when the difference is negative

Sourceval (-) : time -> Period_repr.t -> time

t - p Returns a timestamps p seconds before t.

TODO: https://gitlab.com/tezos/tezos/-/issues/2054 This function should be made available in the environment.

OCaml

Innovation. Community. Security.