Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv18255/src/java/org/logicalcobwebs/proxool/admin
Modified Files:
StatsRoller.java
Log Message:
Removing > jdk 1.2 dependencies.
Index: StatsRoller.java
===================================================================
RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/admin/StatsRoller.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** StatsRoller.java 11 Mar 2003 00:12:11 -0000 1.6
--- StatsRoller.java 10 Sep 2003 22:21:04 -0000 1.7
***************
*** 12,17 ****
import java.util.Calendar;
- import java.util.Timer;
- import java.util.TimerTask;
--- 12,15 ----
***************
*** 42,46 ****
private int units;
! private Timer timer = new Timer(true);
private CompositeStatisticsListener compositeStatisticsListener;
--- 40,44 ----
private int units;
! private boolean running = true;
private CompositeStatisticsListener compositeStatisticsListener;
***************
*** 90,99 ****
// Automatically trigger roll if no activity
! TimerTask tt = new TimerTask() {
public void run() {
! roll();
}
};
! timer.schedule(tt, 1000, 5000);
}
--- 88,107 ----
// Automatically trigger roll if no activity
! final Thread t = new Thread() {
!
public void run() {
! while (running) {
! try {
! Thread.sleep(5000);
! } catch (InterruptedException e) {
! LOG.debug("Interruption", e);
! }
! roll();
! }
}
+
};
! t.setDaemon(true);
! t.start();
}
***************
*** 102,106 ****
*/
protected void cancel() {
! timer.cancel();
}
--- 110,114 ----
*/
protected void cancel() {
! running = false;
}
***************
*** 181,184 ****
--- 189,195 ----
Revision history:
$Log$
+ Revision 1.7 2003/09/10 22:21:04 chr32
+ Removing > jdk 1.2 dependencies.
+
Revision 1.6 2003/03/11 00:12:11 billhorsman
switch to concurrent package
|