org.artoolkitx.arx.arxj

## Class FPSCounter

- java.lang.Object
- - org.artoolkitx.arx.arxj.FPSCounter

-     public class FPSCounter
      extends java.lang.Object

  Utility class to measure performance in frames per second. This can be useful for camera capture or graphics rendering.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FPSCounter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `frame()` Call this function during each frame.
    `float` | `getFPS()` Returns the last calculated FPS value.
    `void` | `reset()`
    `java.lang.String` | `toString()` Provides a string representation of the current FPS value.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FPSCounter

          public FPSCounter()

  - ### Method Detail

    - #### reset

          public void reset()

    - #### frame

          public boolean frame()

      Call this function during each frame. The count of elapsed frames will be increased and if a second has elapsed since the last FPS calculation, a new FPS value will be calculated. If this happens, then the function will return true.
      Returns:
        true if a new FPS value has been calculated.

    - #### getFPS

          public float getFPS()

      Returns the last calculated FPS value.
      Returns:
        The last calculated FPS value.

    - #### toString

          public java.lang.String toString()

      Provides a string representation of the current FPS value.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        A string representation of the current FPS value.