fixed source code links to go to repo.or.cz repository
[applet-bots.git] / src / appletbots / TimeUpdaterThread.java
blob7c6a073d586aaee6f2fc06058716590454ed3e20
1 /*
2 * Copyright (c) 2002 Erik Rasmussen - All Rights Reserverd
3 */
4 package appletbots;
6 /**
7 * This thread is used by the appletbots applet to update its components after
8 * each time cycle
10 * @author Erik Rasmussen
12 public class TimeUpdaterThread extends Thread
14 /**
15 * The applet this thread is running for
17 private Applet applet;
19 /**
20 * Constructs a new TimeUpdaterThread for the given applet
22 * @param applet The applet the thread is to run for
24 public TimeUpdaterThread(final Applet applet)
26 this.applet = applet;
29 /**
30 * Simply calls applet.updateTimeField() and sleeps for applet.getDelay()
31 * milliseconds
33 public void run()
35 while (true)
37 applet.updateTimeField();
38 try
40 Thread.sleep(applet.getDelay());
42 catch (InterruptedException e)
44 break;