public class Timer
extends java.lang.Object
Timing to wait for a flexible amount of time.| Constructor and Description |
|---|
Timer(long delay) |
| Modifier and Type | Method and Description |
|---|---|
void |
forcePass()
Force the timer to tick.
|
long |
getPassedTime() |
long |
getTime() |
boolean |
hasPassed()
Check if the delay has passed.
|
void |
reset()
Reset the time.
|
long |
timeUntil() |
void |
waitUntil()
Wait until the delay has passed.
|
public long getTime()
public void reset()
public void forcePass()
public long getPassedTime()
public boolean hasPassed()
public long timeUntil()
public void waitUntil()
throws java.lang.InterruptedException
java.lang.InterruptedException - If the thread is interrupted