public class CPUUtils
extends java.lang.Object
Constructor and Description |
---|
CPUUtils() |
Modifier and Type | Method and Description |
---|---|
static float |
getSystemCpuUsage(java.lang.String start,
java.lang.String end)
Computes and returns the total CPU/Core usage, in percent.
|
static java.lang.String |
readSystemStats(android.system.cpu.CPUHandler handler)
Reads and returns the status of the provided core index from the system.
|
public static java.lang.String readSystemStats(android.system.cpu.CPUHandler handler) throws CPUException
handler
- The CPUHandler used to read the system stats.CPUException
- If there is an error during the configuration
process.public static float getSystemCpuUsage(java.lang.String start, java.lang.String end)
start
- First read of /proc/stat.end
- Second read of /proc/stat.readSystemStats(CPUHandler)