Interface ReadOnlyTimer

All Known Implementing Classes:
Timer

public interface ReadOnlyTimer
ReadOnlyTimer is the base interface for all Ardor3D timer implementations. Used throughout Ardor3D for framerate and time dependent calculations.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Get the current number of frames per second (fps).
    long
    Get the resolution used by this timer.
    long
    Get elapsed time since this timer was created or reset, in the resolution specified by the implementation (usually in nanoseconds).
    double
    Get elapsed time in seconds since this timer was created or reset.
    double
    Get the time elapsed between the latest two frames, in seconds.
  • Method Details

    • getTimeInSeconds

      double getTimeInSeconds()
      Get elapsed time in seconds since this timer was created or reset.
      Returns:
      Time in seconds
      See Also:
    • getTime

      long getTime()
      Get elapsed time since this timer was created or reset, in the resolution specified by the implementation (usually in nanoseconds).
      Returns:
      Time in resolution specified by implementation
      See Also:
    • getResolution

      long getResolution()
      Get the resolution used by this timer. Nanosecond resolution would return 10^9
      Returns:
      Timer resolution
    • getFrameRate

      double getFrameRate()
      Get the current number of frames per second (fps).
      Returns:
      Current frames per second (fps)
    • getTimePerFrame

      double getTimePerFrame()
      Get the time elapsed between the latest two frames, in seconds.
      Returns:
      Time between frames, in seconds