better relative time
This commit is contained in:
parent
0e46ea162a
commit
262aeaec66
8 changed files with 115 additions and 89 deletions
|
|
@ -58,28 +58,29 @@ module Bytes_64 = struct
|
|||
end
|
||||
|
||||
(* -- Time -- *)
|
||||
module type Time_S = sig
|
||||
type t = Timestamp.t
|
||||
|
||||
val bin : t Bin.t
|
||||
end
|
||||
|
||||
module TIME : Time_S = struct
|
||||
module TimeAbsolute = struct
|
||||
type t = Timestamp.t
|
||||
|
||||
let bin = Timestamp.bin
|
||||
end
|
||||
|
||||
module TIME_NBO : Time_S = struct
|
||||
module TimeAbsoluteNBO = struct
|
||||
type t = Timestamp.t
|
||||
|
||||
let bin = Timestamp.bin_nbo
|
||||
end
|
||||
|
||||
module TimeAbsolute : Time_S = TIME
|
||||
module TimeAbsoluteNBO : Time_S = TIME_NBO
|
||||
module TimeRelative : Time_S = TIME
|
||||
module TimeRelativeNBO : Time_S = TIME_NBO
|
||||
module TimeRelative = struct
|
||||
type t = Timestamp.Span.t
|
||||
|
||||
let bin = Timestamp.Span.bin
|
||||
end
|
||||
|
||||
module TimeRelativeNBO = struct
|
||||
type t = Timestamp.Span.t
|
||||
|
||||
let bin = Timestamp.Span.bin_nbo
|
||||
end
|
||||
|
||||
(* -- Cryptographic primitives -- *)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue