struct
type t = float
[@@deriving yojson]
let now () : t = Unix.gettimeofday ()
let to_filename f =
let open Unix in
let tm = gmtime f in
fmt "%04d-%02d-%02d-%02dh%02dm%02ds%03dms-UTC"
(tm.tm_year + 1900)
(tm.tm_mon + 1)
(tm.tm_mday)
(tm.tm_hour + 1)
(tm.tm_min + 1)
(tm.tm_sec)
((f -. (floor f)) *. 1000. |> int_of_float)
let log f = Log.s (to_filename f)
end