equal
deleted
inserted
replaced
19 |
19 |
20 (*Note start point for timing*) |
20 (*Note start point for timing*) |
21 fun startTiming() = System.processtime (); |
21 fun startTiming() = System.processtime (); |
22 |
22 |
23 (*Finish timing and return string*) |
23 (*Finish timing and return string*) |
24 fun endTiming before = |
24 fun endTiming before = |
25 "User + GC: " ^ |
25 "User + GC: " ^ |
26 makestring (real (System.processtime () - before) / 10.0) ^ |
26 makestring (real (System.processtime () - before) / 10.0) ^ |
27 " secs"; |
27 " secs"; |
28 |
28 |
29 |
29 |
30 (* prompts *) |
30 (* prompts *) |
31 |
31 |
63 if verbose then show_output () else () |
63 if verbose then show_output () else () |
64 end; |
64 end; |
65 |
65 |
66 |
66 |
67 |
67 |
|
68 (** interrupts **) (*Note: may get into race conditions*) |
|
69 |
|
70 fun mask_interrupt f x = f x; |
|
71 fun unmask_interrupt f x = f x; |
|
72 fun exhibit_interrupt f x = f x; |
|
73 |
|
74 |
|
75 |
68 (** OS related **) |
76 (** OS related **) |
69 |
77 |
70 local |
78 local |
71 |
79 |
72 fun drop_last [] = [] |
80 fun drop_last [] = [] |
94 |
102 |
95 |
103 |
96 (* file handling *) |
104 (* file handling *) |
97 |
105 |
98 (*get time of last modification; if file doesn't exist return an empty string*) |
106 (*get time of last modification; if file doesn't exist return an empty string*) |
99 fun file_info "" = "" (* FIXME !? *) |
107 fun file_info "" = "" (* FIXME !? *) |
100 | file_info name = Int.toString (System.filedate name) handle _ => ""; |
108 | file_info name = Int.toString (System.filedate name) handle _ => ""; |
101 |
109 |
102 structure OS = |
110 structure OS = |
103 struct |
111 struct |
104 structure FileSys = |
112 structure FileSys = |