Daemonize timers

This commit is contained in:
s809
2024-01-05 22:08:16 +05:00
parent 502aaf6a8a
commit 8b0f6a4414
3 changed files with 3 additions and 3 deletions
@@ -58,7 +58,7 @@ public class SharedApi
private static final int MAX_UPDATING_CHUNK_COUNT_PER_THREAD = 500;
private static final int MIN_MS_BETWEEN_OVERLOADED_LOG_MESSAGE = 5_000;
private static final Timer CHUNK_UPDATE_TIMER = new Timer();
private static final Timer CHUNK_UPDATE_TIMER = new Timer("DH-ChunkUpdateTimer", true);
private static AbstractDhWorld currentWorld;
@@ -119,7 +119,7 @@ public abstract class AbstractPresetConfigEventHandler<TPresetEnum extends Enum<
{
public void run() { AbstractPresetConfigEventHandler.this.applyPreset(); }
};
this.applyPresetTimer = new Timer("ApplyPresetTimer");
this.applyPresetTimer = new Timer("DH-ApplyPresetTimer", true);
this.applyPresetTimer.schedule(task, MS_DELAY_BEFORE_APPLYING_PRESET);
}
@@ -47,7 +47,7 @@ import java.util.function.Function;
public class GeneratedFullDataFileHandler extends FullDataFileHandler
{
private static final Logger LOGGER = DhLoggerBuilder.getLogger();
private static final Timer CHUNK_GEN_FINISHED_TIMER = new Timer();
private static final Timer CHUNK_GEN_FINISHED_TIMER = new Timer("DH-ChunkGenFinishedTimer", true);
protected final AtomicReference<IWorldGenerationQueue> worldGenQueueRef = new AtomicReference<>(null);