rm non-NBO Bin.t; rename time modules

This commit is contained in:
swrup 2026-02-24 17:51:30 +01:00 committed by Swrup
parent 7053607c72
commit 104666b7ea
13 changed files with 306 additions and 359 deletions

View file

@ -119,7 +119,7 @@ module Config_duration = struct
let duration = many1 duration_element <* end_of_input
(* TODO put this in Time.Relative *)
(* TODO put this in TimeRelative *)
let dunit_to_seconds u =
let rec f = function
| `Year -> 365 * f `Day
@ -136,7 +136,7 @@ module Config_duration = struct
(fun acc { number; dunit } -> acc + (number * dunit_to_seconds dunit))
0 t
|> Int64.of_int
|> Time.Relative.of_s
|> Time.TimeRelative.of_s
let parse s : duration_element list =
match parse_string ~consume:All duration s with