// (c) 1998 Ekkehard Kraemer (ekraemer@pluto.camelot.de) /** * Sorry, not documented yet. *

* Source */ class Timer implements Runnable { Timer(int ms) { this.ms=ms; thread=new Thread(this); thread.start(); } public void run() { try { while (!stopNow) { synchronized(this) { notifyAll(); } Thread.sleep(ms); } } catch (Exception e) {} synchronized(this) { notifyAll(); } System.err.println("Timer finished"); } int ms; Thread thread; boolean stopNow=false; }