update to handle mtime 2.0

This commit is contained in:
Simon Cruanes 2023-02-23 21:01:38 -05:00
parent 4c330e4ed6
commit 40a743badb
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
3 changed files with 8 additions and 3 deletions

View file

@ -33,7 +33,8 @@
(alcotest :with-test) (alcotest :with-test)
(odoc :with-doc)) (odoc :with-doc))
(depopts (depopts
mtime ; for profiling stuff (mtime
(>= 2.0)) ; for profiling stuff
memtrace ; memory profiling memtrace ; memory profiling
zarith ; for arith zarith ; for arith
) )

View file

@ -16,7 +16,11 @@ depends: [
"alcotest" {with-test} "alcotest" {with-test}
"odoc" {with-doc} "odoc" {with-doc}
] ]
depopts: ["mtime" "memtrace" "zarith"] depopts: [
"mtime" {>= "2.0"}
"memtrace"
"zarith"
]
conflicts: [ conflicts: [
"zarith" {< "1.8"} "zarith" {< "1.8"}
] ]

View file

@ -31,7 +31,7 @@ module Make () : P.BACKEND = struct
let get_ts () : float = let get_ts () : float =
let now = Mtime_clock.now () in let now = Mtime_clock.now () in
Mtime.Span.to_us (Mtime.span program_start now) Mtime.Span.to_float_ns (Mtime.span program_start now) /. 1e3
let emit_sep_ () = let emit_sep_ () =
if !first_ then if !first_ then