aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorfilliatr1999-09-06 15:15:38 +0000
committerfilliatr1999-09-06 15:15:38 +0000
commit16468065acddd4b37bf22f221e6eff604b1c381d (patch)
tree30b4b77664e4ce01f9c64c7fada6075855028007 /lib
parent136cb0538a61792ed8caca9969c8052cc9b42071 (diff)
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
Diffstat (limited to 'lib')
-rw-r--r--lib/util.ml8
-rw-r--r--lib/util.mli5
2 files changed, 13 insertions, 0 deletions
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