From 16468065acddd4b37bf22f221e6eff604b1c381d Mon Sep 17 00:00:00 2001 From: filliatr Date: Mon, 6 Sep 1999 15:15:38 +0000 Subject: mise en place repertoire test-suite/, toplevel/, parsing/ git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@39 85f007b7-540e-0410-9357-904b9bb8a0f7 --- lib/util.ml | 8 ++++++++ lib/util.mli | 5 +++++ 2 files changed, 13 insertions(+) (limited to 'lib') diff --git a/lib/util.ml b/lib/util.ml index 6983410978..fb50d1e4e5 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -259,6 +259,14 @@ type ('a,'b) union = Inl of 'a | Inr of 'b module Intset = Set.Make(struct type t = int let compare = compare end) +type time_stamp = float + +let get_time_stamp () = Unix.time() + +let compare_time_stamps t1 t2 = + let dt = t2 -. t1 in + if dt < 0.0 then -1 else if dt = 0.0 then 0 else 1 + (* Pretty-printing *) let pr_spc () = [< 'sPC >];; diff --git a/lib/util.mli b/lib/util.mli index 2d764d4999..98296264f9 100644 --- a/lib/util.mli +++ b/lib/util.mli @@ -72,6 +72,11 @@ type ('a,'b) union = Inl of 'a | Inr of 'b module Intset : Set.S with type elt = int +type time_stamp + +val get_time_stamp : unit -> time_stamp +val compare_time_stamps : time_stamp -> time_stamp -> int + (*s Pretty-printing. *) val pr_spc : unit -> std_ppcmds -- cgit v1.2.3