public final class FPSCounter
extends java.lang.Object
FPSCounter is used for calculating frames per second (FPS).| Constructor and Description |
|---|
FPSCounter()
Constructs a new
FPSCounter instance. |
| Modifier and Type | Method and Description |
|---|---|
long |
getFPS()
Returns the current FPS.
|
long |
getFrameTimeMillis()
Returns the milliseconds since the last update.
|
void |
update()
Updates this
FPSCounter. |
public long getFPS()
public long getFrameTimeMillis()
public void update()
FPSCounter.
This method should be called once every frame.