删除 Lang.timer (#5537)
This commit is contained in:
@@ -419,26 +419,6 @@ public final class Lang {
|
||||
action.accept(it1.next(), it2.next());
|
||||
}
|
||||
|
||||
private static Timer timer;
|
||||
|
||||
public static synchronized Timer getTimer() {
|
||||
if (timer == null) {
|
||||
timer = new Timer(true);
|
||||
}
|
||||
return timer;
|
||||
}
|
||||
|
||||
public static synchronized TimerTask setTimeout(Runnable runnable, long delayMs) {
|
||||
TimerTask task = new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
runnable.run();
|
||||
}
|
||||
};
|
||||
getTimer().schedule(task, delayMs);
|
||||
return task;
|
||||
}
|
||||
|
||||
public static Throwable resolveException(Throwable e) {
|
||||
if (e instanceof ExecutionException || e instanceof CompletionException)
|
||||
return resolveException(e.getCause());
|
||||
|
||||
Reference in New Issue
Block a user