net.i2p.util
public class SimpleScheduler extends Object
Modifier | Constructor and Description |
---|---|
protected |
SimpleScheduler() |
protected |
SimpleScheduler(String name) |
Modifier and Type | Method and Description |
---|---|
void |
addEvent(SimpleTimer.TimedEvent event,
long timeoutMs)
Queue up the given event to be fired no sooner than timeoutMs from now.
|
void |
addPeriodicEvent(SimpleTimer.TimedEvent event,
long timeoutMs)
Queue up the given event to be fired after timeoutMs and every
timeoutMs thereafter.
|
void |
addPeriodicEvent(SimpleTimer.TimedEvent event,
long initialDelay,
long timeoutMs)
Queue up the given event to be fired after initialDelay and every
timeoutMs thereafter.
|
static SimpleScheduler |
getInstance() |
void |
stop()
Removes the SimpleScheduler.
|
protected SimpleScheduler()
protected SimpleScheduler(String name)
public static SimpleScheduler getInstance()
public void stop()
public void addEvent(SimpleTimer.TimedEvent event, long timeoutMs)
event
- timeoutMs
- public void addPeriodicEvent(SimpleTimer.TimedEvent event, long timeoutMs)
public void addPeriodicEvent(SimpleTimer.TimedEvent event, long initialDelay, long timeoutMs)
event
- initialDelay
- (ms)timeoutMs
-