Package arc.util

Class Timekeeper

java.lang.Object
arc.util.Timekeeper

public class Timekeeper extends Object
Keeps track of a time interval.
  • Method Details

    • ofMillis

      public static Timekeeper ofMillis(long ms)
    • ofTicks

      public static Timekeeper ofTicks(float ticks)
    • ofSeconds

      public static Timekeeper ofSeconds(float seconds)
    • 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 public boolean get()
      Deprecated.
      use exceeded() 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()