Here you can find the source of sleep(TimeUnit timeUnit, long duration)
public static void sleep(TimeUnit timeUnit, long duration)
//package com.java2s; //License from project: Apache License import java.util.concurrent.TimeUnit; public class Main { public static void sleep(TimeUnit timeUnit, long duration) { try {//ww w.j av a 2 s. co m timeUnit.sleep(duration); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); } } }