Class DeltaTimeUtil

java.lang.Object
com.toxicrain.rainengine.util.DeltaTimeUtil

public class DeltaTimeUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    Get the time (in seconds) since the last frame.
    static void
    Resets the timer manually (optional use).
    static void
    Call this once per frame to update the delta time.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DeltaTimeUtil

      public DeltaTimeUtil()
  • Method Details

    • update

      public static void update()
      Call this once per frame to update the delta time.
    • getDeltaTime

      public static double getDeltaTime()
      Get the time (in seconds) since the last frame.
      Returns:
      delta time in seconds
    • reset

      public static void reset()
      Resets the timer manually (optional use).