Mavryk_raw_protocol_alpha.Period_reprtype period = tRepresents a period of time as a non-negative integer.
val encoding : period Mavryk_protocol_environment_alpha.Data_encoding.tval rpc_arg : period Mavryk_protocol_environment_alpha.RPC_arg.tval pp : Mavryk_protocol_environment_alpha.Format.formatter -> period -> unitval to_seconds : period -> int64Returns the number of seconds contained in the period.
val of_seconds :
int64 ->
period Mavryk_protocol_environment_alpha.Error_monad.tzresultConverts a number of seconds to a period.
of_second s fails if s is not positive.
val of_seconds_exn : int64 -> periodConverts a number of seconds to period.
of_second s fails if s is not positive. It should only be used at toplevel for constants.
val add :
period ->
period ->
period Mavryk_protocol_environment_alpha.Error_monad.tzresultSafe addition of periods, guarded against overflow.
val (+?) :
period ->
period ->
period Mavryk_protocol_environment_alpha.Error_monad.tzresultAlias for add.
val mult :
int32 ->
period ->
period Mavryk_protocol_environment_alpha.Error_monad.tzresultSafe multiplication by a positive integer. Guarded against overflow.
val zero : periodval one_second : periodval one_minute : periodval one_hour : period