Skip to content

Commit

Permalink
Use Unix.gettimeofday instead of Rusage
Browse files Browse the repository at this point in the history
  • Loading branch information
filipeom committed Feb 27, 2025
1 parent 1c60420 commit 7d96035
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
menhirLib
ocaml_intrinsics
patricia-tree
rusage
scfg
smtml.prelude
yojson
Expand Down
4 changes: 2 additions & 2 deletions src/utils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
(* Written by the Smtml programmers *)

let run_and_time_call ~use f =
let start = (Rusage.get Self).utime in
let start = Unix.gettimeofday () in
let result = f () in
let stop = (Rusage.get Self).utime in
let stop = Unix.gettimeofday () in
use (stop -. start);
result

0 comments on commit 7d96035

Please sign in to comment.