|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfeud.testgame.util.Ticker
A simple ticker class for measuring in-game-time. This was formerly based on the LWJGL Timer class, but that class has some unfixed problems on some machines/VMs...so it's based on Java5's nanotime now.
Constructor Summary | |
Ticker(int tickrateMS)
Create a new ticker that ticks every n-th millisecond. |
Method Summary | |
void |
forward()
Forward the ticker to the next tick. |
int |
getTicks()
How many ticks have passed since the last call? |
void |
reset()
Reset the ticker. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Ticker(int tickrateMS)
tickrateMS
- the intervalMethod Detail |
public void reset()
public void forward()
public int getTicks()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |