Java tutorial
//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 { timeUnit.sleep(duration); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); } } }