Changeset 4cff55d


Ignore:
Timestamp:
Jun 16, 2011 8:57:13 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
83ee57a
Parents:
cb72bb0
Message:

old TimerTask? cleanup

Location:
apps/i2psnark/java/src/org/klomp/snark
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • apps/i2psnark/java/src/org/klomp/snark/PeerCheckerTask.java

    rcb72bb0 r4cff55d  
    2525import java.util.List;
    2626import java.util.Random;
    27 import java.util.TimerTask;
    2827
    2928import net.i2p.I2PAppContext;
     
    3332 * with the PeerCoordinator to select which Peers get (un)choked.
    3433 */
    35 class PeerCheckerTask extends TimerTask
     34class PeerCheckerTask implements Runnable
    3635{
    3736  private static final long KILOPERSECOND = 1024*(PeerCoordinator.CHECK_PERIOD/1000);
     
    5554        if (peerList.isEmpty() || coordinator.halted()) {
    5655          coordinator.setRateHistory(0, 0);
    57           if (coordinator.halted())
    58             cancel();
    5956          return;
    6057        }
  • apps/i2psnark/java/src/org/klomp/snark/PeerMonitorTask.java

    rcb72bb0 r4cff55d  
    2222
    2323import java.util.Iterator;
    24 import java.util.TimerTask;
    2524
    2625import net.i2p.data.DataHelper;
     
    3029 * Works together with the main Snark class to report periodical statistics.
    3130 */
    32 class PeerMonitorTask extends TimerTask
     31class PeerMonitorTask implements Runnable
    3332{
    3433  final static long MONITOR_PERIOD = 10 * 1000; // Ten seconds.
  • apps/i2psnark/java/src/org/klomp/snark/Snark.java

    rcb72bb0 r4cff55d  
    3333import java.util.Random;
    3434import java.util.StringTokenizer;
    35 import java.util.Timer;
    36 import java.util.TimerTask;
    3735
    3836import net.i2p.I2PAppContext;
Note: See TracChangeset for help on using the changeset viewer.