Thanks for the info on the -Xprof. I have started using that just recently.
I’m actually trying to get at the info in the application itself. In pseudo code, it might look like this -
if(CPU.getActivity() >= 0.60f) {
graphics.antiAliasing(false);
music.stop();
}
if(CPU.getActivity() <= 0.20f) {
graphics.antiAliasing(true);
music.start();
botAI.setDifficulty(AI_HIGH);
}
In the ‘code’ CPU.getActivity would return the processors current loading (think task manager in Windows, or ps or top for linux) as a float 0 being not loaded 1 being fully loaded.
I’ve used a similar technique before. When network traffic got very high, it would start sucking the CPU. In the graphics thread, I checked the loading and if it was too high, I skipped the draw for that frame. This was in a C# program. (Don’t flog me for not using java!)
Am I asking for the impossible?
Regards,
Aaron R>