diff --git a/src/util/Profile.ml b/src/util/Profile.ml index 76737126..b0c25a3a 100644 --- a/src/util/Profile.ml +++ b/src/util/Profile.ml @@ -90,6 +90,9 @@ let[@inline] with1 name f x = exit_with_ b pb; raise e +let[@inline] with2 name f x y = + with_ name (fun () -> f x y) + module Control = struct let setup b = assert (!out_ = None); diff --git a/src/util/Profile.mli b/src/util/Profile.mli index 01cbc003..ec5055ba 100644 --- a/src/util/Profile.mli +++ b/src/util/Profile.mli @@ -14,8 +14,8 @@ val begin_ : string -> probe val exit : probe -> unit val with_ : string -> (unit -> 'a) -> 'a - val with1 : string -> ('a -> 'b) -> 'a -> 'b +val with2 : string -> ('a -> 'b -> 'c) -> 'a -> 'b -> 'c module type BACKEND = sig val get_ts : unit -> float