Import Upstream version 20180207
[hcoop/debian/mlton.git] / lib / cml / tests / run-main.sml
1 val n =
2 case CommandLine.arguments () of
3 [] => 100
4 | s::_ => (case Int.fromString s of
5 NONE => 100
6 | SOME n => n)
7
8 val ts = Time.now ()
9 val _ = Main.doit n
10 val te = Time.now ()
11 val d = Time.-(te, ts)
12 val _ = TextIO.print (concat ["Time start: ", Time.toString ts, "\n"])
13 val _ = TextIO.print (concat ["Time end: ", Time.toString te, "\n"])
14 val _ = TextIO.print (concat ["Time diff: ", LargeInt.toString (Time.toMilliseconds d), "ms\n"])