Ignore:
Timestamp:
Aug 19, 2021, 1:58:46 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
Children:
262deda0
Parents:
8a1d95af
Message:

update exception benchmarks

File:
1 moved

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/code/try-catch.cpp

    r8a1d95af rf79ee0d  
    44#include <exception>
    55#include <iostream>
     6#include <iomanip>
    67
     8using namespace std;
    79using namespace std::chrono;
    810
     
    2931        time_point<steady_clock> end_time = steady_clock::now();
    3032        nanoseconds duration = duration_cast<nanoseconds>(end_time - start_time);
    31         std::cout << "Run-Time (ns): " << duration.count() << std::endl;
     33        cout << "Run-Time (s): " << fixed << setprecision(1) << duration.count() / 1'000'000'000. << endl;
    3234}
Note: See TracChangeset for help on using the changeset viewer.