SleepUtils工具类 方便直接调用Java线程sleep方法
public class SleepUtils {
/**
* 秒
* @param seconds
*/
public static final void second(long seconds) {
try {
TimeUnit.SECONDS.sleep(seconds);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
/**
* 毫秒
* @param milliseconds
*/
public static final void milliseconds(long milliseconds) {
try {
TimeUnit.MILLISECONDS.sleep(milliseconds);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}