diff --git a/OCanren.opam b/OCanren.opam index 54f5da8f9..b74da02f5 100644 --- a/OCanren.opam +++ b/OCanren.opam @@ -33,7 +33,7 @@ depends: [ "benchmark" {with-test} "ocamlformat" {with-test & >= "0.26.1" & < "0.27"} "ppx_inline_test" - "mtime" {< "2.0.0"} + "mtime" {>= "2.0.0"} "odoc" {with-doc} ] build: [ diff --git a/add_timer/install_timer.ml b/add_timer/install_timer.ml index 6a9b73fd8..f4a3c01ce 100644 --- a/add_timer/install_timer.ml +++ b/add_timer/install_timer.ml @@ -9,7 +9,10 @@ module Impl : T = struct let elapsed = Mtime_clock.elapsed let abs_diff start fin = let span = Mtime.Span.abs_diff start fin in - Mtime.Span.({s = to_s span; ms = to_ms span}) + let ns = Mtime.Span.to_float_ns span in + let ms = ns *. 1000000.0 in + let s = ms *. 1000.0 in + {s; ms } end diff --git a/dune-project b/dune-project index 2b2b3a285..2c15cc0b8 100644 --- a/dune-project +++ b/dune-project @@ -34,7 +34,7 @@ (< 0.27))) ppx_inline_test (mtime - (< 2.0.0))) + (>= 2.0.0))) (authors "Dmitrii Boulytchev https://github.com/dboulytchev" "Dmitrii Kosarev https://github.com/Kakadu"