mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-07 11:45:41 -05:00
feat(profile): util with2
This commit is contained in:
parent
784c1dceee
commit
a2c397f1e5
2 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue