src/Tools/quickcheck.ML
changeset 42014 75417ef605ba
parent 42012 2c3fe3cbebae
child 42032 143f37194911
--- a/src/Tools/quickcheck.ML	Sun Mar 20 21:44:38 2011 +0100
+++ b/src/Tools/quickcheck.ML	Sun Mar 20 22:08:12 2011 +0100
@@ -167,12 +167,9 @@
     val frees = Term.add_frees t [];
   in (frees, list_abs_free (frees, t)) end
 
-fun cpu_time description f =  (* FIXME !? *)
-  let
-    val start = Timing.start ()
-    val result = Exn.capture f ()
-    val time = Time.toMilliseconds (#cpu (Timing.result start))
-  in (Exn.release result, (description, time)) end
+fun cpu_time description e =
+  let val ({cpu, ...}, result) = Timing.timing e ()
+  in (result, (description, Time.toMilliseconds cpu)) end
 
 fun limit ctxt (limit_time, is_interactive) f exc () =
   if limit_time then