Changeset f79ee0d for doc/theses/andrew_beach_MMath/code/resume-detor.cfa
- Timestamp:
- Aug 19, 2021, 1:58:46 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
- Children:
- 262deda0
- Parents:
- 8a1d95af
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/code/resume-detor.cfa
r8a1d95af rf79ee0d 3 3 #include <exception.hfa> 4 4 #include <fstream.hfa> 5 #include <stdlib.hfa> 5 #include <stdlib.hfa> // strto 6 6 7 EHM_EXCEPTION(empty_exception)(); 8 9 EHM_VIRTUAL_TABLE(empty_exception, empty_vt); 7 exception empty_exception; 8 vtable(empty_exception) empty_vt; 10 9 11 10 struct WithDestructor {}; … … 17 16 void unwind_destructor(unsigned int frames) { 18 17 if (frames) { 19 20 18 WithDestructor object; 21 19 unwind_destructor(frames - 1); … … 29 27 unsigned int total_frames = 1; 30 28 if (1 < argc) { 31 times = strto l(argv[1], 0p, 10);29 times = strto(argv[1], 0p, 10); 32 30 } 33 31 if (2 < argc) { 34 total_frames = strto l(argv[2], 0p, 10);32 total_frames = strto(argv[2], 0p, 10); 35 33 } 36 34 … … 44 42 } 45 43 Time end_time = timeHiRes(); 46 sout | "Run-Time ( ns): " | (end_time - start_time)`ns;44 sout | "Run-Time (s): " | wd(0,1, (end_time - start_time)`ns / 1_000_000_000.); 47 45 }
Note: See TracChangeset
for help on using the changeset viewer.