From 7698300cfe2d3f944ce2e1d4a60a263620487718 Mon Sep 17 00:00:00 2001 From: xleroy Date: Fri, 20 Dec 2013 13:05:53 +0000 Subject: Merge of branch value-analysis. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2381 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- lib/Camlcoq.ml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/Camlcoq.ml') diff --git a/lib/Camlcoq.ml b/lib/Camlcoq.ml index 929b61e3..ca48341d 100644 --- a/lib/Camlcoq.ml +++ b/lib/Camlcoq.ml @@ -363,6 +363,16 @@ let time3 name fn arg1 arg2 arg3 = add_to_timer name (Unix.gettimeofday() -. start); raise x +let time4 name fn arg1 arg2 arg3 arg4 = + let start = Unix.gettimeofday() in + try + let res = fn arg1 arg2 arg3 arg4 in + add_to_timer name (Unix.gettimeofday() -. start); + res + with x -> + add_to_timer name (Unix.gettimeofday() -. start); + raise x + let print_timers () = Hashtbl.iter (fun name time -> Printf.printf "%-20s %.3f\n" name time) -- cgit