Ignore:
Timestamp:
Jun 24, 2020, 4:57:42 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
8b58bae
Parents:
564148f
Message:

Harmonized readv and yield benchmark

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/benchcltr.hfa

    r564148f r9791ab5  
    1010};
    1111
    12 void ?{}( BenchCluster & this ) {
    13       (this.self){ "Benchmark Cluster" };
     12void ?{}( BenchCluster & this, int flags ) {
     13      (this.self){ "Benchmark Cluster", flags };
    1414
    1515      assert( the_benchmark_cluster == 0p );
     
    2626}
    2727
    28 
     28void wait(double duration, Time & start, Time & end, bool is_tty) {
     29      for() {
     30            sleep(500`ms);
     31            end = getTime();
     32            if( (end - start) >= duration`s ) {
     33                  break;
     34            }
     35            if(is_tty) {
     36                  printf("\r%.4lf", (double)(end - start)`s);
     37                  fflush(stdout);
     38            }
     39      }
     40}
Note: See TracChangeset for help on using the changeset viewer.