public static class BatteryStatsImpl.DurationTimer extends BatteryStatsImpl.StopwatchTimer
mClocks, mCount, mLastCount, mLastTime, mLoadedCount, mLoadedTime, mTimeBase, mTimeBeforeMark, mTotalTime, mType, mUnpluggedCount, mUnpluggedTime
Constructor and Description |
---|
DurationTimer(BatteryStatsImpl.Clocks clocks,
BatteryStatsImpl.Uid uid,
int type,
ArrayList<BatteryStatsImpl.StopwatchTimer> timerPool,
BatteryStatsImpl.TimeBase timeBase) |
DurationTimer(BatteryStatsImpl.Clocks clocks,
BatteryStatsImpl.Uid uid,
int type,
ArrayList<BatteryStatsImpl.StopwatchTimer> timerPool,
BatteryStatsImpl.TimeBase timeBase,
Parcel in) |
Modifier and Type | Method and Description |
---|---|
long |
getCurrentDurationMsLocked(long elapsedRealtimeMs)
Returns the time since the timer was started.
|
long |
getMaxDurationMsLocked(long elapsedRealtimeMs)
Returns the max duration that this timer has ever seen.
|
void |
logState(Printer pw,
String prefix)
Temporary for debugging.
|
void |
onTimeStarted(long elapsedRealtimeUs,
long baseUptime,
long baseRealtime)
The TimeBase time started (again).
|
void |
onTimeStopped(long elapsedRealtimeUs,
long baseUptime,
long baseRealtime)
The TimeBase stopped running.
|
void |
readSummaryFromParcelLocked(Parcel in)
Read the summary parcel.
|
boolean |
reset(boolean detachIfReset)
Clear state of this timer.
|
void |
startRunningLocked(long elapsedRealtimeMs) |
void |
stopRunningLocked(long elapsedRealtimeMs)
Decrements the mNesting ref-count on this timer.
|
void |
writeSummaryFromParcelLocked(Parcel out,
long elapsedRealtimeUs)
Write the summary to the parcel.
|
void |
writeToParcel(Parcel out,
long elapsedRealtimeUs) |
computeCurrentCountLocked, computeRunTimeLocked, detach, isRunningLocked, setMark, setTimeout, stopAllRunningLocked
getCountLocked, getTimeSinceMarkLocked, getTotalTimeLocked, writeTimerToParcel
public DurationTimer(BatteryStatsImpl.Clocks clocks, BatteryStatsImpl.Uid uid, int type, ArrayList<BatteryStatsImpl.StopwatchTimer> timerPool, BatteryStatsImpl.TimeBase timeBase, Parcel in)
public DurationTimer(BatteryStatsImpl.Clocks clocks, BatteryStatsImpl.Uid uid, int type, ArrayList<BatteryStatsImpl.StopwatchTimer> timerPool, BatteryStatsImpl.TimeBase timeBase)
public void writeToParcel(Parcel out, long elapsedRealtimeUs)
writeToParcel
in class BatteryStatsImpl.StopwatchTimer
public void writeSummaryFromParcelLocked(Parcel out, long elapsedRealtimeUs)
writeSummaryFromParcelLocked
in class BatteryStatsImpl.Timer
public void readSummaryFromParcelLocked(Parcel in)
readSummaryFromParcelLocked
in class BatteryStatsImpl.StopwatchTimer
public void onTimeStarted(long elapsedRealtimeUs, long baseUptime, long baseRealtime)
onTimeStarted
in interface BatteryStatsImpl.TimeBaseObs
onTimeStarted
in class BatteryStatsImpl.Timer
public void onTimeStopped(long elapsedRealtimeUs, long baseUptime, long baseRealtime)
onTimeStopped
in interface BatteryStatsImpl.TimeBaseObs
onTimeStopped
in class BatteryStatsImpl.StopwatchTimer
public void logState(Printer pw, String prefix)
BatteryStats.Timer
logState
in class BatteryStatsImpl.StopwatchTimer
public void startRunningLocked(long elapsedRealtimeMs)
startRunningLocked
in class BatteryStatsImpl.StopwatchTimer
public void stopRunningLocked(long elapsedRealtimeMs)
stopRunningLocked
in class BatteryStatsImpl.StopwatchTimer
public boolean reset(boolean detachIfReset)
BatteryStatsImpl.Timer
reset
in class BatteryStatsImpl.StopwatchTimer
public long getMaxDurationMsLocked(long elapsedRealtimeMs)
getMaxDurationMsLocked
in class BatteryStats.Timer
public long getCurrentDurationMsLocked(long elapsedRealtimeMs)
getCurrentDurationMsLocked
in class BatteryStats.Timer