Fix: DelayedExecutorService's watchdog was not being set to repeat
This commit is contained in:
parent
387b329d73
commit
8758db6f75
1 changed files with 3 additions and 2 deletions
|
@ -2,6 +2,7 @@ package dev.zontreck.ariaslib.util;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.concurrent.ScheduledFuture;
|
||||||
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
@ -21,12 +22,12 @@ public class DelayedExecutorService {
|
||||||
inst=new DelayedExecutorService();
|
inst=new DelayedExecutorService();
|
||||||
repeater = new ScheduledThreadPoolExecutor(20);
|
repeater = new ScheduledThreadPoolExecutor(20);
|
||||||
|
|
||||||
repeater.schedule(new Runnable() {
|
repeater.scheduleAtFixedRate(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
DelayedExecutorService.getInstance().onTick();
|
DelayedExecutorService.getInstance().onTick();
|
||||||
}
|
}
|
||||||
}, 1L, TimeUnit.SECONDS);
|
}, 1L, 1L, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
private DelayedExecutorService(){}
|
private DelayedExecutorService(){}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue