Ignore:
File:
1 edited

Legend:

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

    rf79ee0d r54651005  
    33#include <exception.hfa>
    44#include <fstream.hfa>
    5 #include <stdlib.hfa>                                                                   // strto
     5#include <stdlib.hfa>
    66
    7 exception empty_exception;
    8 vtable(empty_exception) empty_vt;
     7EHM_EXCEPTION(empty_exception)();
     8
     9EHM_VIRTUAL_TABLE(empty_exception, empty_vt);
    910
    1011struct WithDestructor {};
     
    1617void unwind_destructor(unsigned int frames) {
    1718        if (frames) {
     19
    1820                WithDestructor object;
    1921                unwind_destructor(frames - 1);
     
    2729        unsigned int total_frames = 1;
    2830        if (1 < argc) {
    29                 times = strto(argv[1], 0p, 10);
     31                times = strtol(argv[1], 0p, 10);
    3032        }
    3133        if (2 < argc) {
    32                 total_frames = strto(argv[2], 0p, 10);
     34                total_frames = strtol(argv[2], 0p, 10);
    3335        }
    3436
     
    4244        }
    4345        Time end_time = timeHiRes();
    44         sout | "Run-Time (s): " | wd(0,1, (end_time - start_time)`ns / 1_000_000_000.);
     46        sout | "Run-Time (ns): " | (end_time - start_time)`ns;
    4547}
Note: See TracChangeset for help on using the changeset viewer.