Ignore:
Timestamp:
Jun 25, 2020, 1:37:33 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
69fbc61
Parents:
c34ebf2
Message:

Fixed benchmark to use getTimeNsec

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/benchcltr.hfa

    rc34ebf2 r8e27ac45  
    2929      for() {
    3030            sleep(100`ms);
    31             end = getTime();
    32             if( (end - start) >= duration`s ) {
     31            end = getTimeNsec();
     32            Duration delta = end - start;
     33            if(is_tty) {
     34                  printf("\r%.1f", delta`ds);
     35                  fflush(stdout);
     36            }
     37            if( delta >= duration`s ) {
    3338                  break;
    34             }
    35             if(is_tty) {
    36                   printf("\r%.4lf", (end - start)`ds);
    37                   fflush(stdout);
    3839            }
    3940      }
Note: See TracChangeset for help on using the changeset viewer.