public class CpuPowerCalculator extends PowerCalculator
Constructor and Description |
---|
CpuPowerCalculator(PowerProfile profile) |
Modifier and Type | Method and Description |
---|---|
void |
calculateApp(BatterySipper app,
BatteryStats.Uid u,
long rawRealtimeUs,
long rawUptimeUs,
int statsType)
Calculate the amount of power an app used for this subsystem.
|
calculateRemaining, reset
public CpuPowerCalculator(PowerProfile profile)
public void calculateApp(BatterySipper app, BatteryStats.Uid u, long rawRealtimeUs, long rawUptimeUs, int statsType)
PowerCalculator
calculateApp
in class PowerCalculator
app
- The BatterySipper that represents the power use of an app.u
- The recorded stats for the app.rawRealtimeUs
- The raw system realtime in microseconds.rawUptimeUs
- The raw system uptime in microseconds.statsType
- The type of stats. Can be BatteryStats.STATS_CURRENT
,
BatteryStats.STATS_SINCE_CHARGED
, or
BatteryStats.STATS_SINCE_UNPLUGGED
.