Here you can find the source of sleepOrCry(long timeToWait)
public static void sleepOrCry(long timeToWait)
//package com.java2s; //License from project: Open Source License public class Main { public static void sleepOrCry(long timeToWait) { sleepOrCry(timeToWait, null);//from ww w. j a va 2 s . c o m } public static void sleepOrCry(long timeToWait, String message) { try { Thread.sleep(timeToWait); } catch (InterruptedException e) {//NOSONAR if (message == null) throw new IllegalStateException(e); throw new IllegalStateException(message, e); } } }