public class PerformanceMonitor extends Object
The system collects a set of listeners that register with the monitor and provide their own priority. A higher priority listener will be called before a lower priority listener for updates to both upgrade and downgrade their performance.
Internationalisation Resource Names
| Constructor and Description |
|---|
PerformanceMonitor()
Create a new monitor instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPerformanceListener(SystemPerformanceListener l,
int priority)
Add a system performance listener to the list to be processed.
|
void |
appShutdown()
Notification that the AV3D internal shutdown handler has detected a
system-wide shutdown.
|
float |
getMaximumFrameRate()
Get the current maximum acceptable frame rate.
|
float |
getMinimumFrameRate()
Get the current minimum acceptable frame rate.
|
int |
getUpdateInterval()
Get the current checking interval.
|
void |
removePerformanceListener(SystemPerformanceListener l)
Remove a system performance listener from the current processing list.
|
void |
setMaximumFrameRate(float fps)
Get the current maximum acceptable frame rate.
|
void |
setMinimumFrameRate(float fps)
Get the current minimum acceptable frame rate.
|
void |
setUpdateInterval(int interval)
Set the update interval.
|
void |
updateMetrics()
Notification that now is a good time to update the scene graph.
|
public void updateMetrics()
public void appShutdown()
public int getUpdateInterval()
public void setUpdateInterval(int interval)
throws IllegalArgumentException
interval - The new interval value to set. Must be > zeroIllegalArgumentException - The value was not positivepublic float getMinimumFrameRate()
public void setMinimumFrameRate(float fps)
throws IllegalArgumentException
fps - The frames per second numberIllegalArgumentException - The value was negative or greater than
or equal to the max FPSpublic float getMaximumFrameRate()
public void setMaximumFrameRate(float fps)
throws IllegalArgumentException
fps - The frames per second numberIllegalArgumentException - The value was negative or less than or
equal to the minimum FPSpublic void addPerformanceListener(SystemPerformanceListener l, int priority)
l - The new listener instance to be handledpublic void removePerformanceListener(SystemPerformanceListener l)
l - The listener instance to be removed
Copyright © 2001 - 2015 j3d.org