ADT
        aaron-thesis
        arm-eh
        ast-experimental
        cleanup-dtors
        deferred_resn
        demangler
        enum
        forall-pointer-decay
        jacob/cs343-translation
        jenkins-sandbox
        new-ast
        new-ast-unique-expr
        new-env
        no_list
        persistent-indexer
        pthread-emulation
        qualifiedEnum
        resolv-new
        with_gc
      
      
        
          | 
            Last change
 on this file since 8024bc8 was             8cb6fcd, checked in by Thierry Delisle <tdelisle@…>, 9 years ago           | 
        
        
          | 
             
Refactored common code into bench.h 
 
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            330 bytes
           | 
        
      
      
| Rev | Line |   | 
|---|
| [de90452] | 1 | #include <fstream>
 | 
|---|
 | 2 | #include <stdlib>
 | 
|---|
| [29f44a74] | 3 | #include <thread>
 | 
|---|
| [de90452] | 4 | 
 | 
|---|
| [8cb6fcd] | 5 | #include "bench.h"
 | 
|---|
| [de90452] | 6 | 
 | 
|---|
 | 7 | int main() {
 | 
|---|
 | 8 |         const unsigned int NoOfTimes = N;
 | 
|---|
 | 9 |         long long int StartTime, EndTime;
 | 
|---|
 | 10 | 
 | 
|---|
 | 11 |         StartTime = Time();
 | 
|---|
 | 12 |         for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) {
 | 
|---|
 | 13 |                 yield();
 | 
|---|
 | 14 |         }
 | 
|---|
 | 15 |         EndTime = Time();
 | 
|---|
 | 16 | 
 | 
|---|
 | 17 |         sout | ( EndTime - StartTime ) / NoOfTimes | endl;
 | 
|---|
 | 18 | }
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.