java.lang.Runnable
public abstract class Ticker
extends java.lang.Object
implements java.lang.Runnable
Constructor | Description |
---|---|
Ticker​(long interval) |
A Ticker that, when started, fires every INTERVAL milliseconds, or
never, if interval <= 0.
|
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Permanently stop THIS and terminate its thread.
|
void |
run() |
Internal method.
|
void |
start() |
Start ticking, executing tick() at each tick.
|
void |
stop() |
Stop ticking.
|
protected abstract void |
tick() |
Action to perform on each clock tick.
|
public Ticker​(long interval)
public void start()
public void stop()
public void close()
protected abstract void tick()
public void run()
run
in interface java.lang.Runnable