From 94d2c1d46d50b47a35526cd0adf043330c522e17 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Sat, 29 Jun 2013 20:07:31 +0200 Subject: [PATCH] Some users want to set the delay to 0? --- src/com/massivecraft/mcore/ModuloRepeatTask.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/massivecraft/mcore/ModuloRepeatTask.java b/src/com/massivecraft/mcore/ModuloRepeatTask.java index cfabfae6..14ab3964 100644 --- a/src/com/massivecraft/mcore/ModuloRepeatTask.java +++ b/src/com/massivecraft/mcore/ModuloRepeatTask.java @@ -59,6 +59,10 @@ public abstract class ModuloRepeatTask implements Runnable @Override public void run() { + // So the delay millis is lower than one? (could for example be zero) + // This probably means the task should not be executed at all. + if (this.getDelayMillis() < 1) return; + long nowMillis = System.currentTimeMillis(); long previousMillis = this.getPreviousMillis();