Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/code/throw-empty.cfa

    ree23a8d rea593a3  
    11// Throw Across Empty Function
    2 #include <clock.hfa>
    32#include <exception.hfa>
    4 #include <fstream.hfa>
    53#include <stdlib.hfa>
    64
     
    2018        unsigned int times = 1;
    2119        unsigned int total_frames = 1;
    22         if (1 < argc) {
     20        if (2 < argc) {
    2321                times = strtol(argv[1], 0p, 10);
    2422        }
    25         if (2 < argc) {
     23        if (3 < argc) {
    2624                total_frames = strtol(argv[2], 0p, 10);
    2725        }
    2826
    29         Time start_time = timeHiRes();
    3027        for (unsigned int count = 0 ; count < times ; ++count) {
    3128                try {
     
    3532                }
    3633        }
    37         Time end_time = timeHiRes();
    38         sout | "Run-Time (ns): " | (end_time - start_time)`ns;
    3934}
Note: See TracChangeset for help on using the changeset viewer.