Avoid "timeout is negative" exception in watchdog

This commit is contained in:
embeddedt 2024-06-29 13:46:03 -04:00
parent dfb9378297
commit b541e33e9c
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -45,6 +45,7 @@ public class IntegratedWatchdog extends Thread {
if(delta > MAX_TICK_DELTA) {
LOGGER.error("A single server tick has taken {}, more than {} milliseconds", delta, MAX_TICK_DELTA);
LOGGER.error(ThreadDumper.obtainThreadDump());
delta = 0;
}
try {
Thread.sleep(MAX_TICK_DELTA - delta);