Mavryk_raw_protocol_alpha.Time_reprinclude module type of struct include Mavryk_protocol_environment_alpha.Time endval of_seconds : int64 -> tval to_seconds : t -> int64val of_notation : string -> t optionval of_notation_exn : string -> tval to_notation : t -> stringval encoding : t Mavryk_protocol_environment_alpha.Data_encoding.tval rfc_encoding : t Mavryk_protocol_environment_alpha.Data_encoding.tval pp_hum : Mavryk_protocol_environment_alpha.Format.formatter -> t -> unittype time = tInternal timestamp representation.
val pp : Mavryk_protocol_environment_alpha.Format.formatter -> t -> unitPretty-prints the time stamp using RFC3339 format.
val of_seconds_string : string -> time optionParses RFC3339 representation and returns a timestamp.
val to_seconds_string : time -> stringReturns the timestamp encoded in RFC3339 format.
val (+?) :
time ->
Period_repr.t ->
time Mavryk_protocol_environment_alpha.Error_monad.tzresultAdds a time span to a timestamp. This function fails on integer overflow
val (-?) :
time ->
time ->
Period_repr.t Mavryk_protocol_environment_alpha.Error_monad.tzresultReturns the difference between two timestamps as a time span. This function fails when the difference is negative
val (-) : time -> Period_repr.t -> timet - 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.