daily pastebin goal
17%
SHARE
TWEET

Untitled

a guest Sep 22nd, 2018 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static void waitASec() {
  2.  
  3.     long time = new Date().getTime();
  4.     long timePassed = new Date().getTime() - time;
  5.     int counter = 0
  6.     while(timePassed < 1000) {
  7.         counter = counter+1;
  8.         timePassed = new Date().getTime() - time;
  9.     }
  10.     System.out.println("wated "+counter+" loops");
  11.  
  12. }
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