Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void waitASec() {
- long time = new Date().getTime();
- long timePassed = new Date().getTime() - time;
- int counter = 0
- while(timePassed < 1000) {
- counter = counter+1;
- timePassed = new Date().getTime() - time;
- }
- System.out.println("wated "+counter+" loops");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement