summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Camlcoq.ml66
1 files changed, 0 insertions, 66 deletions
diff --git a/lib/Camlcoq.ml b/lib/Camlcoq.ml
index ca48341..c580e21 100644
--- a/lib/Camlcoq.ml
+++ b/lib/Camlcoq.ml
@@ -324,69 +324,3 @@ let coqfloat_of_camlfloat f =
let camlfloat_of_coqfloat f =
Int64.float_of_bits(camlint64_of_coqint(Float.bits_of_double f))
-(* Timing facility *)
-
-(*
-let timers = Hashtbl.create 9
-
-let add_to_timer name time =
- let old = try Hashtbl.find timers name with Not_found -> 0.0 in
- Hashtbl.replace timers name (old +. time)
-
-let time name fn arg =
- let start = Unix.gettimeofday() in
- try
- let res = fn arg in
- add_to_timer name (Unix.gettimeofday() -. start);
- res
- with x ->
- add_to_timer name (Unix.gettimeofday() -. start);
- raise x
-
-let time2 name fn arg1 arg2 =
- let start = Unix.gettimeofday() in
- try
- let res = fn arg1 arg2 in
- add_to_timer name (Unix.gettimeofday() -. start);
- res
- with x ->
- add_to_timer name (Unix.gettimeofday() -. start);
- raise x
-
-let time3 name fn arg1 arg2 arg3 =
- let start = Unix.gettimeofday() in
- try
- let res = fn arg1 arg2 arg3 in
- add_to_timer name (Unix.gettimeofday() -. start);
- res
- with x ->
- 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)
- timers
-
-let _ = at_exit print_timers
-*)
-
-(* Heap profiling facility *)
-
-(*
-let heap_info msg =
- Gc.full_major();
- let s = Gc.stat() in
- Printf.printf "%s: size %d live %d\n " msg s.Gc.heap_words s.Gc.live_words;
- flush stdout
-*)