vroious improvements

This commit is contained in:
Stephan Richter
2021-02-12 18:04:28 +01:00
parent 2973bd1432
commit c3242cddcb
10 changed files with 88 additions and 47 deletions

View File

@@ -34,8 +34,9 @@ public class DelayedAction extends ActionList {
Application.threadPool.execute(new Thread() {
public void run() {
try {
Thread.sleep(min_delay + (min_delay < max_delay ? random.nextInt(max_delay - min_delay) : 0));
LOG.debug("{} ms passed by, firing actions:",min_delay);
int delay = min_delay + (min_delay < max_delay ? random.nextInt(max_delay - min_delay) : 0);
Thread.sleep(delay);
LOG.debug("{} ms passed by, firing actions:",delay);
} catch (InterruptedException e) {
LOG.warn("Interrupted Exception thrown while waiting:",e);
}