org.gudy.azureus2.core3.util
Class SimpleTimer

java.lang.Object
  extended by org.gudy.azureus2.core3.util.SimpleTimer

public class SimpleTimer
extends Object

Author:
parg

Nested Class Summary
static interface SimpleTimer.TimerTickReceiver
           
 
Field Summary
protected static Timer timer
          A simple timer class for use by application components that want to schedule low-overhead events (i.e.
 
Constructor Summary
SimpleTimer()
           
 
Method Summary
static TimerEvent addEvent(String name, long when, boolean absolute, TimerEventPerformer performer)
           
static TimerEvent addEvent(String name, long when, TimerEventPerformer performer)
           
static TimerEventPeriodic addPeriodicEvent(String name, long frequency, boolean absolute, TimerEventPerformer performer)
           
static TimerEventPeriodic addPeriodicEvent(String name, long frequency, TimerEventPerformer performer)
           
static void addTickReceiver(SimpleTimer.TimerTickReceiver receiver)
           
static void removeTickReceiver(SimpleTimer.TimerTickReceiver receiver)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timer

protected static final Timer timer
A simple timer class for use by application components that want to schedule low-overhead events (i.e. when fired the event shouldn't take significant processing time as there is a limited thread pool to service it

Constructor Detail

SimpleTimer

public SimpleTimer()
Method Detail

addEvent

public static TimerEvent addEvent(String name,
                                  long when,
                                  TimerEventPerformer performer)

addEvent

public static TimerEvent addEvent(String name,
                                  long when,
                                  boolean absolute,
                                  TimerEventPerformer performer)

addPeriodicEvent

public static TimerEventPeriodic addPeriodicEvent(String name,
                                                  long frequency,
                                                  TimerEventPerformer performer)

addPeriodicEvent

public static TimerEventPeriodic addPeriodicEvent(String name,
                                                  long frequency,
                                                  boolean absolute,
                                                  TimerEventPerformer performer)

addTickReceiver

public static void addTickReceiver(SimpleTimer.TimerTickReceiver receiver)

removeTickReceiver

public static void removeTickReceiver(SimpleTimer.TimerTickReceiver receiver)