avoid fragile parsing of end_timing result -- would have produced GC time on MosML, for example;
authorwenzelm
Sun, 01 Mar 2009 16:22:37 +0100
changeset 30188 82144a95f9ec
parent 30187 b92b3375e919
child 30189 3633f560f4c3
avoid fragile parsing of end_timing result -- would have produced GC time on MosML, for example;
src/Pure/Tools/find_consts.ML
src/Pure/Tools/find_theorems.ML
--- a/src/Pure/Tools/find_consts.ML	Sun Mar 01 16:21:33 2009 +0100
+++ b/src/Pure/Tools/find_consts.ML	Sun Mar 01 16:22:37 2009 +0100
@@ -119,9 +119,7 @@
       |> sort (rev_order o int_ord o pairself snd)
       |> map ((apsnd fst) o fst);
 
-    val end_msg = " in " ^
-                  (List.nth (String.tokens Char.isSpace (end_timing start), 3))
-                  ^ " secs"
+    val end_msg = " in " ^ Time.toString (#all (end_timing start)) ^ " secs";
   in
     Pretty.big_list "searched for:" (map pretty_criterion raw_criteria)
       :: Pretty.str ""
--- a/src/Pure/Tools/find_theorems.ML	Sun Mar 01 16:21:33 2009 +0100
+++ b/src/Pure/Tools/find_theorems.ML	Sun Mar 01 16:22:37 2009 +0100
@@ -372,9 +372,7 @@
     val lim = the_default (! limit) opt_limit;
     val thms = Library.drop (len - lim, matches);
 
-    val end_msg = " in " ^
-                  (List.nth (String.tokens Char.isSpace (end_timing start), 3))
-                  ^ " secs"
+    val end_msg = " in " ^ Time.toString (#all (end_timing start)) ^ " secs";
   in
     Pretty.big_list "searched for:" (map (pretty_criterion ctxt) criteria)
         :: Pretty.str "" ::