Here you can find the source of sleep(long interval)
Parameter | Description |
---|---|
interval | time to sleep in milliseconds |
public static boolean sleep(long interval)
//package com.java2s; /*// w w w .j av a 2 s . co m * Copyright (c) 2006-2010 Marvisan Pty. Ltd. All rights reserved.6 * Use is subject to license terms. */ public class Main { /** * Sleeps the given interval of time given in milliseconds. * @param interval time to sleep in milliseconds * @return true if was not interrupted */ public static boolean sleep(long interval) { boolean result = true; try { Thread.sleep(interval); } catch (InterruptedException ex) { result = false; } return result; } }