Commit 3c5495e6 authored by Pietro Abate's avatar Pietro Abate

[r2005-03-30 16:19:27 by afrisch] Empty log message

Original author: afrisch
Date: 2005-03-30 16:19:27+00:00
parent 4460caed
......@@ -71,19 +71,19 @@ cduce_types.p.cmx: cduce_types.cmx
CDUCE_INCLUDES = $(DIRS:%=-I %)
cduce/types/intervals.cmo: cduce/types/intervals.ml cduce/cat1 cduce/types/intervals_int.ml
$(CAMLC) $(COMPFLAGS) -c $(CDUCE_INCLUDES) -pp 'cduce/cat1 cduce/types/intervals_int.ml' $<
cduce/types/intervals.cmx: cduce/types/intervals.ml cduce/cat1 cduce/types/intervals_int.ml
$(CAMLOPT) $(OPTCOMPFLAGS) -c $(CDUCE_INCLUDES) -pp 'cduce/cat1 cduce/types/intervals_int.ml' $<
cduce/types/intervals.cmi: cduce/types/intervals.mli cduce/cat1 cduce/types/intervals_int.mli
$(CAMLC) $(COMPFLAGS) -c $(CDUCE_INCLUDES) -pp 'cduce/cat1 cduce/types/intervals_int.mli' $<
cduce/misc/stats.cmo: cduce/misc/stats.ml
$(CAMLC) $(COMPFLAGS) -c $(CDUCE_INCLUDES) -pp 'sed s/Unix\\.gettimeofday\(\)/0./' $<
cduce/misc/stats.cmx: cduce/misc/stats.ml
$(CAMLOPT) $(OPTCOMPFLAGS) -c $(CDUCE_INCLUDES) -pp 'sed s/Unix\\.gettimeofday\(\)/0./' $<
#cduce/types/intervals.cmo: cduce/types/intervals.ml cduce/cat1 cduce/types/intervals_int.ml
# $(CAMLC) $(COMPFLAGS) -c $(CDUCE_INCLUDES) -pp 'cduce/cat1 cduce/types/intervals_int.ml' $<
#
#cduce/types/intervals.cmx: cduce/types/intervals.ml cduce/cat1 cduce/types/intervals_int.ml
# $(CAMLOPT) $(OPTCOMPFLAGS) -c $(CDUCE_INCLUDES) -pp 'cduce/cat1 cduce/types/intervals_int.ml' $<
#
#cduce/types/intervals.cmi: cduce/types/intervals.mli cduce/cat1 cduce/types/intervals_int.mli
# $(CAMLC) $(COMPFLAGS) -c $(CDUCE_INCLUDES) -pp 'cduce/cat1 cduce/types/intervals_int.mli' $<
#cduce/misc/stats.cmo: cduce/misc/stats.ml
# $(CAMLC) $(COMPFLAGS) -c $(CDUCE_INCLUDES) -pp 'sed s/Unix\\.gettimeofday\(\)/0./' $<
#cduce/misc/stats.cmx: cduce/misc/stats.ml
# $(CAMLOPT) $(OPTCOMPFLAGS) -c $(CDUCE_INCLUDES) -pp 'sed s/Unix\\.gettimeofday\(\)/0./' $<
cduce/cat1:
echo "cat \$$1" > cduce/cat1
......
open Location
open Ident
let () = Stats.gettimeofday := Unix.gettimeofday
exception Escape of exn
exception InvalidInputFilename of string
exception InvalidObjectFilename of string
......
......@@ -2,6 +2,8 @@ type verbosity = Quiet | Summary | Details
let verbosity = ref Quiet
let set_verbosity = (:=) verbosity
let gettimeofday = ref (fun _ -> 0.)
let todo = ref []
let register level f = todo := (level,f) :: !todo
......@@ -32,13 +34,13 @@ module Timer = struct
let start c =
assert(not c.is_in);
c.is_in <- true;
c.last <- Unix.gettimeofday();
c.last <- !gettimeofday();
c.count <- c.count + 1
let stop c x =
assert(c.is_in);
c.is_in <- false;
c.total <- c.total +. (Unix.gettimeofday() -. c.last);
c.total <- c.total +. (!gettimeofday() -. c.last);
x
end
......
type verbosity = Quiet | Summary | Details
val set_verbosity: verbosity -> unit
val gettimeofday: (unit -> float) ref
val register: verbosity -> (Format.formatter -> unit) -> unit
val dump: Format.formatter -> unit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment