Checks every second.
This commit is contained in:
parent
2d77ac8e65
commit
be29dea796
@ -11,11 +11,11 @@ public class delegationTimer {
|
|||||||
{
|
{
|
||||||
final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
|
final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
|
||||||
final Runnable runnable = new Runnable() {
|
final Runnable runnable = new Runnable() {
|
||||||
int countdownStarter = 3;
|
int countdownStarter = 2;
|
||||||
public void run() {
|
public void run() {
|
||||||
countdownStarter--;
|
countdownStarter--;
|
||||||
if (countdownStarter <= 0) {
|
if (countdownStarter <= 0) {
|
||||||
countdownStarter = 3;
|
countdownStarter = 2;
|
||||||
delegationServices.delegate();
|
delegationServices.delegate();
|
||||||
scheduler.shutdown();
|
scheduler.shutdown();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user