- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/code/resume-detor.cfa
rf79ee0d r54651005 3 3 #include <exception.hfa> 4 4 #include <fstream.hfa> 5 #include <stdlib.hfa> // strto5 #include <stdlib.hfa> 6 6 7 exception empty_exception; 8 vtable(empty_exception) empty_vt; 7 EHM_EXCEPTION(empty_exception)(); 8 9 EHM_VIRTUAL_TABLE(empty_exception, empty_vt); 9 10 10 11 struct WithDestructor {}; … … 16 17 void unwind_destructor(unsigned int frames) { 17 18 if (frames) { 19 18 20 WithDestructor object; 19 21 unwind_destructor(frames - 1); … … 27 29 unsigned int total_frames = 1; 28 30 if (1 < argc) { 29 times = strto (argv[1], 0p, 10);31 times = strtol(argv[1], 0p, 10); 30 32 } 31 33 if (2 < argc) { 32 total_frames = strto (argv[2], 0p, 10);34 total_frames = strtol(argv[2], 0p, 10); 33 35 } 34 36 … … 42 44 } 43 45 Time end_time = timeHiRes(); 44 sout | "Run-Time ( s): " | wd(0,1, (end_time - start_time)`ns / 1_000_000_000.);46 sout | "Run-Time (ns): " | (end_time - start_time)`ns; 45 47 }
Note: See TracChangeset
for help on using the changeset viewer.