public abstract class PlatformUtils
extends java.lang.Object
Constructor and Description |
---|
PlatformUtils() |
Modifier and Type | Method and Description |
---|---|
abstract long |
currentTimeMillis()
Platform independent version of
System.currentTimeMillis() |
abstract void |
exit(boolean ignorePlatformRestrictions)
Exits the game
|
abstract long |
getAvailableMemory()
Gets the total memory available for the game
|
double |
getAverageRenderDuration()
Returns the average duration of render(
Graphics ) |
double |
getAverageUpdateDuration()
Returns the average duration of update()
|
int |
getFramesPerSecond()
Returns the number of frames per second
|
abstract long |
getTotalMemory()
Gets the total memory that can be used by the game
|
int |
getUpdatesPerSecond()
Returns the number of updates per second
|
abstract long |
getUsedMemory()
Gets the total memory used by the game
|
abstract boolean |
isGameThread()
Indicates if the current thread is the game thread
|
void |
markFrame()
Internal usage only: marks a new frame
|
void |
markRenderBegin()
Internal usage only: marks the beginning of rendering operations
|
void |
markRenderEnd()
Internal usage only: marks the end of rendering operations
|
void |
markUpdateBegin()
Internal usage only: marks the beginning of update operations
|
void |
markUpdateEnd()
Internal usage only: marks the end of update operations
|
abstract long |
nanoTime()
Platform independent version of
System.nanoTime() |
public abstract void exit(boolean ignorePlatformRestrictions)
ignorePlatformRestrictions
- exit even if platform rules don't permit exiting programmatically. Should be
used only for debug purposes and always set to false for release builds.public abstract long nanoTime()
System.nanoTime()
System.nanoTime()
public abstract long currentTimeMillis()
System.currentTimeMillis()
System.currentTimeMillis()
public abstract long getTotalMemory()
public abstract long getAvailableMemory()
public abstract long getUsedMemory()
public abstract boolean isGameThread()
public void markUpdateBegin()
public void markRenderEnd()
public void markRenderBegin()
public void markUpdateEnd()
public void markFrame()
public int getUpdatesPerSecond()
public int getFramesPerSecond()
public double getAverageUpdateDuration()
public double getAverageRenderDuration()
Graphics
)