Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package program2;
- /**
- *
- * @author steklei
- */
- public class Wait {
- public static void oneSec() {
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- System.err.println(e);
- }
- }
- public static void manySec(long s) {
- try {
- Thread.sleep(s * 1000);
- } catch (InterruptedException e) {
- System.err.println(e);
- }
- }
- public static void tenthOfSec(long s) {
- try {
- Thread.sleep(s * 100);
- } catch (InterruptedException e) {
- System.err.println(e);
- }
- }
- public static void milliSecs(long s) {
- try {
- Thread.sleep(s);
- } catch (InterruptedException e) {
- System.err.println(e);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement