Ignore:
File:
1 edited

Legend:

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

    rea593a3 ree23a8d  
    11// Throw Across Empty Function
     2#include <clock.hfa>
    23#include <exception.hfa>
     4#include <fstream.hfa>
    35#include <stdlib.hfa>
    46
     
    1820        unsigned int times = 1;
    1921        unsigned int total_frames = 1;
    20         if (2 < argc) {
     22        if (1 < argc) {
    2123                times = strtol(argv[1], 0p, 10);
    2224        }
    23         if (3 < argc) {
     25        if (2 < argc) {
    2426                total_frames = strtol(argv[2], 0p, 10);
    2527        }
    2628
     29        Time start_time = timeHiRes();
    2730        for (unsigned int count = 0 ; count < times ; ++count) {
    2831                try {
     
    3235                }
    3336        }
     37        Time end_time = timeHiRes();
     38        sout | "Run-Time (ns): " | (end_time - start_time)`ns;
    3439}
Note: See TracChangeset for help on using the changeset viewer.