Advertisement
Guest User

Wait

a guest
Oct 17th, 2013
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5. package program2;
  6.  
  7. /**
  8. *
  9. * @author steklei
  10. */
  11. public class Wait {
  12.  
  13. public static void oneSec() {
  14. try {
  15. Thread.sleep(1000);
  16. } catch (InterruptedException e) {
  17. System.err.println(e);
  18. }
  19. }
  20.  
  21. public static void manySec(long s) {
  22. try {
  23. Thread.sleep(s * 1000);
  24. } catch (InterruptedException e) {
  25. System.err.println(e);
  26. }
  27. }
  28.  
  29. public static void tenthOfSec(long s) {
  30. try {
  31. Thread.sleep(s * 100);
  32. } catch (InterruptedException e) {
  33. System.err.println(e);
  34. }
  35. }
  36.  
  37. public static void milliSecs(long s) {
  38. try {
  39. Thread.sleep(s);
  40. } catch (InterruptedException e) {
  41. System.err.println(e);
  42. }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement