Ignore:
Timestamp:
Jul 7, 2021, 6:24:42 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum, stuck-waitfor-destruct
Children:
d83b266
Parents:
1f45c7d (diff), b1a2c4a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 moved

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/code/cond-catch.cfa

    r1f45c7d rc86ee4c  
    11// Conditional Match (or Re-Raise)
     2#include <clock.hfa>
    23#include <exception.hfa>
     4#include <fstream.hfa>
    35#include <stdlib.h>
    46
     
    2325int main(int argc, char * argv[]) {
    2426        unsigned int times = 1;
    25         if (2 < argc) {
     27        if (1 < argc) {
    2628                times = strtol(argv[1], 0p, 10);
    2729        }
     30        if (2 < argc) {
     31                should_catch = strtol(argv[2], 0p, 10);
     32        }
    2833
     34        Time start_time = timeHiRes();
    2935        for (unsigned int count = 0 ; count < times ; ++count) {
    3036                try {
     
    3440                }
    3541        }
     42        Time end_time = timeHiRes();
     43        sout | "Run-Time (ns): " | (end_time - start_time)`ns;
    3644}
Note: See TracChangeset for help on using the changeset viewer.