Here you can find the source of sleepSilently(int millis)
Parameter | Description |
---|---|
millis | The amount of milliseconds to sleep |
public static void sleepSilently(int millis)
//package com.java2s; /*/*w w w .ja v a 2 s .com*/ * Copyright (C) 2016 Sebastian Hjelm * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 3 * of the License, or (at your option) any later version. */ public class Main { /** * Attempts to sleep for the specified amount of milliseconds. Any * {@link InterruptedException} are caught and discarded. * @param millis The amount of milliseconds to sleep */ public static void sleepSilently(int millis) { try { Thread.sleep(millis); } catch (InterruptedException e) { } } }