daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class PW11 {
  2.  
  3.     /**
  4.      * @param args the command line arguments
  5.      */
  6.     public static void main(String[] args)   {
  7.         int i=0;
  8.          long startTime = System.currentTimeMillis();
  9.         do{
  10.        
  11.  
  12.         Thread ob=new Thread();
  13.        
  14.         ob.start();
  15.             try {
  16.                 ob.join();
  17.             } catch (InterruptedException ex) {
  18.                 Logger.getLogger(PW11.class.getName()).log(Level.SEVERE, null, ex);
  19.             }
  20. ++i;
  21.         }while(i<1000);
  22.  
  23.              long endTime = System.currentTimeMillis();
  24.           System.out.println("czas: "+(endTime-startTime) );
  25.      
  26.     }  
  27.    
  28. }
  29.    
  30.  
  31.  
  32. //502ms/1000=0.502ms
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top