Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class PW11 {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- int i=0;
- long startTime = System.currentTimeMillis();
- do{
- Thread ob=new Thread();
- ob.start();
- try {
- ob.join();
- } catch (InterruptedException ex) {
- Logger.getLogger(PW11.class.getName()).log(Level.SEVERE, null, ex);
- }
- ++i;
- }while(i<1000);
- long endTime = System.currentTimeMillis();
- System.out.println("czas: "+(endTime-startTime) );
- }
- }
- //502ms/1000=0.502ms
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement