q3fuba

loop measure without break

Aug 29th, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. public class main {
  2.  
  3.     public static void main(String[] args) {
  4.         long startTime = System.nanoTime();
  5.        
  6.         for(int x = 0; x < 1234567890; x++) {
  7.             if (x == 234) {
  8.             }
  9.         }
  10.        
  11.         long duration = System.nanoTime() - startTime;
  12.         System.out.println("Execution Time: "+duration+" nanoseconds");
  13.  
  14.     }
  15.  
  16. }
Add Comment
Please, Sign In to add comment