Ignore:
Timestamp:
Jul 5, 2021, 3:17:12 PM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
11ad42f, e84ab3d
Parents:
b7763da
Message:

Added duration information (in nanoseconds) to EHM benchmarks.

File:
1 edited

Legend:

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

    rb7763da ree23a8d  
    11// Resume Across Other Handler
     2#include <clock.hfa>
    23#include <exception.hfa>
     4#include <fstream.hfa>
    35#include <stdlib.hfa>
    46
     
    2426        unsigned int times = 1;
    2527        unsigned int total_frames = 1;
    26         if (2 < argc) {
     28        if (1 < argc) {
    2729                times = strtol(argv[1], 0p, 10);
    2830        }
    29         if (3 < argc) {
     31        if (2 < argc) {
    3032                total_frames = strtol(argv[2], 0p, 10);
    3133        }
    3234
     35        Time start_time = timeHiRes();
    3336        for (int count = 0 ; count < times ; ++count) {
    3437                try {
     
    3841                }
    3942        }
     43        Time end_time = timeHiRes();
     44        sout | "Run-Time (ns): " | (end_time - start_time)`ns;
    4045}
Note: See TracChangeset for help on using the changeset viewer.