public static class BatteryStatsImpl.StopwatchTimer extends BatteryStatsImpl.Timer
mClocks, mCount, mLastCount, mLastTime, mLoadedCount, mLoadedTime, mTimeBase, mTimeBeforeMark, mTotalTime, mType, mUnpluggedCount, mUnpluggedTime
Constructor and Description |
---|
StopwatchTimer(BatteryStatsImpl.Clocks clocks,
BatteryStatsImpl.Uid uid,
int type,
ArrayList<BatteryStatsImpl.StopwatchTimer> timerPool,
BatteryStatsImpl.TimeBase timeBase) |
StopwatchTimer(BatteryStatsImpl.Clocks clocks,
BatteryStatsImpl.Uid uid,
int type,
ArrayList<BatteryStatsImpl.StopwatchTimer> timerPool,
BatteryStatsImpl.TimeBase timeBase,
Parcel in) |
Modifier and Type | Method and Description |
---|---|
protected int |
computeCurrentCountLocked() |
protected long |
computeRunTimeLocked(long curBatteryRealtime) |
void |
detach() |
boolean |
isRunningLocked()
Returns whether the timer is currently running.
|
void |
logState(Printer pw,
String prefix)
Temporary for debugging.
|
void |
onTimeStopped(long elapsedRealtime,
long baseUptime,
long baseRealtime) |
void |
readSummaryFromParcelLocked(Parcel in) |
boolean |
reset(boolean detachIfReset)
Clear state of this timer.
|
void |
setMark(long elapsedRealtimeMs)
Set the mark so that we can query later for the total time the timer has
accumulated since this point.
|
void |
setTimeout(long timeout) |
void |
startRunningLocked(long elapsedRealtimeMs) |
void |
stopAllRunningLocked(long elapsedRealtimeMs) |
void |
stopRunningLocked(long elapsedRealtimeMs) |
void |
writeToParcel(Parcel out,
long elapsedRealtimeUs) |
getCountLocked, getTimeSinceMarkLocked, getTotalTimeLocked, onTimeStarted, writeSummaryFromParcelLocked, writeTimerToParcel
getCurrentDurationMsLocked, getMaxDurationMsLocked
public StopwatchTimer(BatteryStatsImpl.Clocks clocks, BatteryStatsImpl.Uid uid, int type, ArrayList<BatteryStatsImpl.StopwatchTimer> timerPool, BatteryStatsImpl.TimeBase timeBase, Parcel in)
public StopwatchTimer(BatteryStatsImpl.Clocks clocks, BatteryStatsImpl.Uid uid, int type, ArrayList<BatteryStatsImpl.StopwatchTimer> timerPool, BatteryStatsImpl.TimeBase timeBase)
public void setTimeout(long timeout)
public void writeToParcel(Parcel out, long elapsedRealtimeUs)
writeToParcel
in class BatteryStatsImpl.Timer
public void onTimeStopped(long elapsedRealtime, long baseUptime, long baseRealtime)
onTimeStopped
in interface BatteryStatsImpl.TimeBaseObs
onTimeStopped
in class BatteryStatsImpl.Timer
public void logState(Printer pw, String prefix)
BatteryStats.Timer
logState
in class BatteryStatsImpl.Timer
public void startRunningLocked(long elapsedRealtimeMs)
public boolean isRunningLocked()
BatteryStats.Timer
isRunningLocked
in class BatteryStats.Timer
public void stopRunningLocked(long elapsedRealtimeMs)
public void stopAllRunningLocked(long elapsedRealtimeMs)
protected long computeRunTimeLocked(long curBatteryRealtime)
computeRunTimeLocked
in class BatteryStatsImpl.Timer
protected int computeCurrentCountLocked()
computeCurrentCountLocked
in class BatteryStatsImpl.Timer
public boolean reset(boolean detachIfReset)
BatteryStatsImpl.Timer
reset
in class BatteryStatsImpl.Timer
public void detach()
detach
in class BatteryStatsImpl.Timer
public void readSummaryFromParcelLocked(Parcel in)
readSummaryFromParcelLocked
in class BatteryStatsImpl.Timer
public void setMark(long elapsedRealtimeMs)
elapsedRealtimeMs
- the current elapsed realtime in milliseconds.