aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Camlcoq.ml
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-12-20 13:05:53 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-12-20 13:05:53 +0000
commit7698300cfe2d3f944ce2e1d4a60a263620487718 (patch)
tree74292bb5f65bc797906b5c768df2e2e937e869b6 /lib/Camlcoq.ml
parentc511207bd0f25c4199770233175924a725526bd3 (diff)
downloadcompcert-kvx-7698300cfe2d3f944ce2e1d4a60a263620487718.tar.gz
compcert-kvx-7698300cfe2d3f944ce2e1d4a60a263620487718.zip
Merge of branch value-analysis.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2381 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'lib/Camlcoq.ml')
-rw-r--r--lib/Camlcoq.ml10
1 files changed, 10 insertions, 0 deletions
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)