2 * 2004 Matthew
Fluet (mfluet@acm
.org
)
3 * Ported to MLton threads
.
6 structure TimeIt
: TIMEIT
=
10 fun timeit (name
: string) (f
: 'a
-> 'b
) (a
: 'a
) : 'b
=
13 val start
= Time
.now ()
16 val finish
= Time
.now ()
17 val diff
= Time
.-(finish
, start
)
22 LargeInt
.toString (Time
.toMilliseconds diff
),
27 handle e
=> (done (); raise e
)