Ignore:
File:
1 edited

Legend:

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

    rea593a3 r47e413b  
    11// Cross a Try Statement With Finally Clause
     2#include <clock.hfa>
    23#include <exception.hfa>
     4#include <fstream.hfa>
    35#include <stdlib.hfa>
    46
     
    810        unsigned int times = 1;
    911        unsigned int total_frames = 1;
    10         if (2 < argc) {
     12        if (1 < argc) {
    1113                times = strtol(argv[1], 0p, 10);
    1214        }
    13         if (3 < argc) {
     15        if (2 < argc) {
    1416                total_frames = strtol(argv[2], 0p, 10);
    1517        }
    1618
     19        Time start_time = timeHiRes();
    1720        for (unsigned int count = 0 ; count < times ; ++count) {
    1821                try {
     
    2225                }
    2326        }
     27        Time end_time = timeHiRes();
     28        sout | "Run-Time (ns): " | (end_time - start_time)`ns;
    2429}
Note: See TracChangeset for help on using the changeset viewer.