mte/src/timestamp.mli

38 lines
819 B
OCaml

(* TODO time
uhuh!
need to be int64 for binary/pg round trip
really need to fix this module
don't use option for never/forever *)
type t = Ptime.t option
type span = Ptime.Span.t option
module Span : sig
type t = span
val of_string : string -> (t, string) result
val pp : Stdlib.Format.formatter -> t -> unit
(* - *)
val jsont : t Jsont.t
val bin : t Bin.t
val bin_nbo : t Bin.t
val caqti : t Caqti_type.t
end
val epoch : t
val diff : t -> t -> span
val add_span_exn : t -> span -> t
val of_span_exn : span -> t
val compare : t -> t -> int option
(* used for offline tool argument conversion *)
val of_string : string -> (t, string) result
val pp : Stdlib.Format.formatter -> t -> unit
(* - *)
val jsont : t Jsont.t
val bin : t Bin.t
val bin_nbo : t Bin.t
val caqti : t Caqti_type.t