Sleep current thread
public class ServerUtils { public static void sleep(long time) { try { Thread.currentThread(); Thread.sleep(time); } catch (InterruptedException ex) { ex.printStackTrace(); } } }