Mavryk_raw_protocol_001_PtAtLas.Period_repr
type period = t
Represents a period of time as a non-negative integer.
val encoding : period Mavryk_protocol_environment_001_PtAtLas.Data_encoding.t
val rpc_arg : period Mavryk_protocol_environment_001_PtAtLas.RPC_arg.t
val pp :
Mavryk_protocol_environment_001_PtAtLas.Format.formatter ->
period ->
unit
val to_seconds : period -> int64
Returns the number of seconds contained in the period.
val of_seconds :
int64 ->
period Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Converts a number of seconds to a period
.
of_second s
fails if s
is not positive.
val of_seconds_exn : int64 -> period
Converts a number of seconds to period
.
of_second s
fails if s
is not positive. It should only be used at toplevel for constants.
Safe addition of periods, guarded against overflow.
val (+?) :
period ->
period ->
period Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Alias for add
.
val mult :
int32 ->
period ->
period Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Safe multiplication by a positive integer. Guarded against overflow.
val zero : period
val one_second : period
val one_minute : period
val one_hour : period