Java tutorial
//package com.java2s; import java.util.concurrent.TimeUnit; public class Main { public static void sleep(long duration, TimeUnit unit) { try { Thread.sleep(unit.toMillis(duration)); } catch (Exception ignored) { } } }