public abstract static class BatteryStats.Timer extends Object
Constructor and Description |
---|
Timer() |
Modifier and Type | Method and Description |
---|---|
abstract int |
getCountLocked(int which)
Returns the count associated with this Timer for the
selected type of statistics.
|
long |
getCurrentDurationMsLocked(long elapsedRealtimeMs)
Returns the current time the timer has been active, if it is being tracked.
|
long |
getMaxDurationMsLocked(long elapsedRealtimeMs)
Returns the max duration if it is being tracked.
|
abstract long |
getTimeSinceMarkLocked(long elapsedRealtimeUs)
Returns the total time in microseconds associated with this Timer since the
'mark' was last set.
|
abstract long |
getTotalTimeLocked(long elapsedRealtimeUs,
int which)
Returns the total time in microseconds associated with this Timer for the
selected type of statistics.
|
boolean |
isRunningLocked()
Returns whether the timer is currently running.
|
abstract void |
logState(Printer pw,
String prefix)
Temporary for debugging.
|
public abstract int getCountLocked(int which)
which
- one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENTpublic abstract long getTotalTimeLocked(long elapsedRealtimeUs, int which)
elapsedRealtimeUs
- current elapsed realtime of system in microsecondswhich
- one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENTpublic abstract long getTimeSinceMarkLocked(long elapsedRealtimeUs)
elapsedRealtimeUs
- current elapsed realtime of system in microsecondspublic long getMaxDurationMsLocked(long elapsedRealtimeMs)
public long getCurrentDurationMsLocked(long elapsedRealtimeMs)
public boolean isRunningLocked()