Java tutorial
//package com.java2s; import java.util.concurrent.TimeUnit; public class Main { public static void sleep(long durationMillis) { try { Thread.sleep(durationMillis); } catch (InterruptedException var3) { Thread.currentThread().interrupt(); } } public static void sleep(long duration, TimeUnit unit) { try { Thread.sleep(unit.toMillis(duration)); } catch (InterruptedException var4) { Thread.currentThread().interrupt(); } } }