public interface TickSource
TickListener objects are guaranteed to not overlap each
other, ie. no two threads will enter the same object's
TickListener.tick(long) at the same time.| Modifier and Type | Method and Description |
|---|---|
void |
addListener(TickListener listener)
Adds a listener to fire tick events to.
|
long |
getCurrentTick()
Returns the current tick.
|
void |
removeListener(TickListener listener)
Removes a tick listener.
|
void |
reset()
Resets the tick source to its initial state.
|
void reset()
void addListener(TickListener listener)
listener - the listener to addvoid removeListener(TickListener listener)
listener - the listener to removelong getCurrentTick()
Copyright © 2015. All rights reserved.