Here you can find the source of trySleepMillis(int millis)
public static boolean trySleepMillis(int millis)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean trySleepMillis(int millis) { try {//from w w w . j a v a 2 s .c om Thread.sleep(millis); return true; } catch (Exception ex) { } return false; } }