aboutsummaryrefslogtreecommitdiff
path: root/lib/util.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.ml')
-rw-r--r--lib/util.ml8
1 files changed, 8 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 >];;