Package arc.util
Class Timekeeper
java.lang.Object
arc.util.Timekeeper
Keeps track of a time interval.
-
Method Summary
Modifier and TypeMethodDescriptionlongelapsed()booleanexceeded()booleanget()Deprecated.longinterval()longlast()static TimekeeperofMillis(long ms) static TimekeeperofSeconds(float seconds) static TimekeeperofTicks(float ticks) booleanpoll()longvoidreset()resets the timer; the interval will need to pass until get() returns true again.voidzero()
-
Method Details
-
ofMillis
-
ofTicks
-
ofSeconds
-
poll
public boolean poll()- Returns:
- true if the interval has passed since the last reset(); resets the timer if true
-
interval
public long interval() -
get
Deprecated.useexceeded()instead.- Returns:
- true if the interval has passed since the last reset().
-
exceeded
public boolean exceeded() -
elapsed
public long elapsed() -
remaining
public long remaining() -
last
public long last() -
reset
public void reset()resets the timer; the interval will need to pass until get() returns true again. -
zero
public void zero()
-
exceeded()instead.