diff --git a/src/java/com/samskivert/util/Interval.java b/src/java/com/samskivert/util/Interval.java index cdff5013..fdb7be89 100644 --- a/src/java/com/samskivert/util/Interval.java +++ b/src/java/com/samskivert/util/Interval.java @@ -69,6 +69,17 @@ public abstract class Interval * method. If null is supplied the interval will be run directly on the timer thread. */ public Interval (RunQueue runQueue) + { + setRunQueue(runQueue); + } + + /** + * Configures the run queue to be used by this interval. This must be called before + * the interval is started and a non-null queue must be provided. This exists for situations + * where the caller needs to configure an optional run queue and thus can't easily call the + * appropriate constructor. + */ + public void setRunQueue (RunQueue runQueue) { if (runQueue == null) { throw new IllegalArgumentException("Supplied RunQueue must be non-null");