- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/code/throw-empty.cfa
ree23a8d rea593a3 1 1 // Throw Across Empty Function 2 #include <clock.hfa>3 2 #include <exception.hfa> 4 #include <fstream.hfa>5 3 #include <stdlib.hfa> 6 4 … … 20 18 unsigned int times = 1; 21 19 unsigned int total_frames = 1; 22 if ( 1< argc) {20 if (2 < argc) { 23 21 times = strtol(argv[1], 0p, 10); 24 22 } 25 if ( 2< argc) {23 if (3 < argc) { 26 24 total_frames = strtol(argv[2], 0p, 10); 27 25 } 28 26 29 Time start_time = timeHiRes();30 27 for (unsigned int count = 0 ; count < times ; ++count) { 31 28 try { … … 35 32 } 36 33 } 37 Time end_time = timeHiRes();38 sout | "Run-Time (ns): " | (end_time - start_time)`ns;39 34 }
Note: See TracChangeset
for help on using the changeset viewer.