ADT
        aaron-thesis
        arm-eh
        ast-experimental
        cleanup-dtors
        deferred_resn
        enum
        forall-pointer-decay
        jacob/cs343-translation
        jenkins-sandbox
        new-ast
        new-ast-unique-expr
        no_list
        persistent-indexer
        pthread-emulation
        qualifiedEnum
      
      
        
          | 
            Last change
 on this file since 5ebb1368 was             bf71cfd, checked in by Thierry Delisle <tdelisle@…>, 7 years ago           | 
        
        
          | 
             
Moved up many directories in source 
 
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            281 bytes
           | 
        
      
      
| Line |   | 
|---|
| 1 | public class JavaThread {
 | 
|---|
| 2 |         public static void main(String[] args) {
 | 
|---|
| 3 |                 int NoOfTimes = 5000000;
 | 
|---|
| 4 |                 long start = System.nanoTime();
 | 
|---|
| 5 |                 for(int i = 1; i <= NoOfTimes; i += 1) {
 | 
|---|
| 6 |                         Thread.yield();
 | 
|---|
| 7 |                 }
 | 
|---|
| 8 |                 long end = System.nanoTime();
 | 
|---|
| 9 |                 System.out.println( (end - start) / NoOfTimes);
 | 
|---|
| 10 |         }
 | 
|---|
| 11 | }
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.