Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/code/resume-finally.cfa

    rea593a3 ree23a8d  
    11// Throw Across Finally
     2#include <clock.hfa>
    23#include <exception.hfa>
     4#include <fstream.hfa>
    35#include <stdlib.hfa>
    46
     
    2224        unsigned int times = 1;
    2325        unsigned int total_frames = 1;
    24         if (2 < argc) {
     26        if (1 < argc) {
    2527                times = strtol(argv[1], 0p, 10);
    2628        }
    27         if (3 < argc) {
     29        if (2 < argc) {
    2830                total_frames = strtol(argv[2], 0p, 10);
    2931        }
    3032
     33        Time start_time = timeHiRes();
    3134        for (int count = 0 ; count < times ; ++count) {
    3235                try {
     
    3639                }
    3740        }
     41        Time end_time = timeHiRes();
     42        sout | "Run-Time (ns): " | (end_time - start_time)`ns;
    3843}
Note: See TracChangeset for help on using the changeset viewer.