Changeset ee23a8d for doc/theses/andrew_beach_MMath/code/throw-finally.cfa
- Timestamp:
- Jul 5, 2021, 3:17:12 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 11ad42f, e84ab3d
- Parents:
- b7763da
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/code/throw-finally.cfa
rb7763da ree23a8d 1 1 // Throw Across Finally 2 #include <clock.hfa> 2 3 #include <exception.hfa> 4 #include <fstream.hfa> 3 5 #include <stdlib.hfa> 4 6 … … 22 24 unsigned int times = 1; 23 25 unsigned int total_frames = 1; 24 if ( 2< argc) {26 if (1 < argc) { 25 27 times = strtol(argv[1], 0p, 10); 26 28 } 27 if ( 3< argc) {29 if (2 < argc) { 28 30 total_frames = strtol(argv[2], 0p, 10); 29 31 } 30 32 33 Time start_time = timeHiRes(); 31 34 for (int count = 0 ; count < times ; ++count) { 32 35 try { … … 36 39 } 37 40 } 41 Time end_time = timeHiRes(); 42 sout | "Run-Time (ns): " | (end_time - start_time)`ns; 38 43 }
Note: See TracChangeset
for help on using the changeset viewer.