删除 Lang.timer (#5537)

This commit is contained in:
Glavo
2026-02-14 22:04:04 +08:00
committed by GitHub
parent 64ce1854f5
commit 25fef6b5c2
2 changed files with 0 additions and 54 deletions

View File

@@ -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());