Changeset 4aa495f for example


Ignore:
Timestamp:
Apr 18, 2021, 8:21:14 AM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
d2fadeb
Parents:
e54d0c3
Message:

More fixes after another change to getTimeNsec()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • example/io/batch-readv.c

    re54d0c3 r4aa495f  
    6666}
    6767
    68 uint64_t getTimeNsec() {
     68uint64_t timeHiRes() {
    6969        timespec curr;
    7070        clock_gettime( CLOCK_REALTIME, &curr );
     
    163163
    164164        printf("Running for %f second, reading %d bytes in batches of %d\n", duration, buflen, batch);
    165         uint64_t start = getTimeNsec();
    166         uint64_t end   = getTimeNsec();
    167         uint64_t prev  = getTimeNsec();
     165        uint64_t start = timeHiRes();
     166        uint64_t end   = timeHiRes();
     167        uint64_t prev  = timeHiRes();
    168168        for(;;) {
    169169                submit_and_drain(&iov, batch);
    170                 end = getTimeNsec();
     170                end = timeHiRes();
    171171                uint64_t delta = end - start;
    172172                if( to_fseconds(end - prev) > 0.1 ) {
Note: See TracChangeset for help on using the changeset viewer.