= 768" x-on:close-sidebar="sidebar=window.innerWidth >= 768 && true">
ON THIS PAGE
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
time
A representation of timestamps.
NOTE: This representation is limited to times between 0000-01-01 00:00:00 UTC and 9999-12-31 23:59:59.999999999999 UTC
NOTE: This is based on the system clock. As a result, it is affected by system clock adjustments. IF you need monotonous time, you can use Mtime
.
type t = Ptime.t
val epoch : t
module Span : sig ... end
Conversions to and from Protocol time. Note that converting system time to protocol time truncates any subsecond precision.
val of_protocol_opt : Protocol.t -> t option
val of_protocol_exn : Protocol.t -> t
val to_protocol : t -> Protocol.t
Conversions to and from string. It uses rfc3339.
val of_notation_opt : string -> t option
val of_notation_exn : string -> t
val to_notation : t -> string
Serialization.
val encoding : t Data_encoding.t
val rfc_encoding : t Data_encoding.t
val rpc_arg : t Tezos_rpc.RPC_arg.t
Pretty-printing
val pp_hum : Format.formatter -> t -> unit
Timestamping data.
Data with an associated time stamp.
val stamped_encoding : 'a Data_encoding.t -> 'a stamped Data_encoding.t
val pp_stamped :
(Format.formatter -> 'a -> unit) ->
Format.formatter ->
'a stamped ->
unit
recent a b
is either a
or b
(which ever carries the most recent timestamp), or None
if both a
and b
are None
.
Helper modules
val hash : t -> int
ON THIS PAGE