Java tutorial
//package com.java2s; public class Main { /** * Put a thread to sleep for a set number of milliseconds * @param thread the thread * @param milliseconds the sleep time */ public static void sleep(Thread thread, int milliseconds) { try { thread.sleep(milliseconds); } catch (InterruptedException e) { thread.interrupt(); } } }