Use TimeUnit for time calculations
This commit is contained in:
@@ -59,6 +59,8 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
|
||||
/**
|
||||
* @author Matze
|
||||
* @author Ronan
|
||||
@@ -665,7 +667,7 @@ public class EventInstanceManager {
|
||||
}
|
||||
|
||||
disposeLocks();
|
||||
}, 60 * 1000);
|
||||
}, MINUTES.toMillis(1));
|
||||
}
|
||||
|
||||
private void disposeLocks() {
|
||||
|
||||
@@ -51,6 +51,8 @@ import java.util.concurrent.Semaphore;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
//import jdk.nashorn.api.scripting.ScriptUtils;
|
||||
|
||||
/**
|
||||
@@ -265,7 +267,7 @@ public class EventManager {
|
||||
synchronized (instances) {
|
||||
instances.remove(name);
|
||||
}
|
||||
}, YamlConfig.config.server.EVENT_LOBBY_DELAY * 1000);
|
||||
}, SECONDS.toMillis(YamlConfig.config.server.EVENT_LOBBY_DELAY));
|
||||
}
|
||||
|
||||
public void setProperty(String key, String value) {
|
||||
|
||||
Reference in New Issue
Block a user