void (long delay) { watchdelay = delay; if (delay == 0) { watch = 0; } else { long prev = watch; watch = System.currentTimeMillis() + delay; if (timer == null) { timer = new Thread(this); timer.setPriority(Thread.MIN_PRIORITY); timer.setDaemon(true); timer.start(); } if ((prev == 0) || (watch < prev)) { synchronized (this) { notify(); } //try {}catch (IllegalMonitorStateException imse) {} } } }