Class MSTimer
java.lang.Object
de.florianmichael.rclasses.math.concept.MSTimer
A simple timer class.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MSTimer
public MSTimer()
-
-
Method Details
-
pause
public void pause()Pauses the timer. -
resume
public void resume()Resumes the timer. -
reset
public void reset()Resets the timer. -
hasReached
public boolean hasReached(long delay) - Parameters:
delay- The delay to check.- Returns:
- Whether the timer has reached the given delay.
-
getDelta
public long getDelta()- Returns:
- The delta time in milliseconds.
-
getTime
public long getTime()- Returns:
- The time in milliseconds. If the timer is paused, the paused time is returned.
-
setTime
public void setTime(long time)
-