equal
deleted
inserted
replaced
207 (case Option.map Int.fromString (AList.lookup (op =) settings key) of |
207 (case Option.map Int.fromString (AList.lookup (op =) settings key) of |
208 SOME (SOME i) => i |
208 SOME (SOME i) => i |
209 | SOME NONE => error ("bad option: " ^ key) |
209 | SOME NONE => error ("bad option: " ^ key) |
210 | NONE => default) |
210 | NONE => default) |
211 |
211 |
212 fun cpu_time f x = |
212 fun cpu_time f x = (* FIXME !? *) |
213 let |
213 let |
214 val start = start_timing () |
214 val start = Timing.start () |
215 val result = Exn.capture (fn () => f x) () |
215 val result = Exn.capture (fn () => f x) () |
216 val time = Time.toMilliseconds (#cpu (end_timing start)) |
216 val time = Time.toMilliseconds (#cpu (Timing.result start)) |
217 in (Exn.release result, time) end |
217 in (Exn.release result, time) end |
218 |
218 |
219 end |
219 end |