添加线程工具类睡眠方法.

pull/84/head
chen.ma 3 years ago
parent cb7eda9a8f
commit 334a066e53

@ -22,4 +22,22 @@ public class ThreadUtil {
return t;
}
/**
* 线.
*
* @param millis
* @return
*/
public static boolean sleep(long millis) {
if (millis > 0) {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
return false;
}
}
return true;
}
}

Loading…
Cancel
Save