Java tutorial
//package com.java2s; import java.util.concurrent.TimeUnit; public class Main { public static void sleep(int second, String threadName, String tag) { try { TimeUnit.SECONDS.sleep(second); System.out.println(threadName + " has sleep " + second + " seconds.\t tag : " + tag); } catch (InterruptedException e) { } } }