Home
last modified time | relevance | path

Searched refs:timeBase (Results 1 – 9 of 9) sorted by relevance

/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBatteryStatsTimerTest.java44 TestTimer(Clocks clocks, int type, TimeBase timeBase, Parcel in) { in TestTimer() argument
45 super(clocks, type, timeBase, in); in TestTimer()
48 TestTimer(Clocks clocks, int type, TimeBase timeBase) { in TestTimer() argument
49 super(clocks, type, timeBase); in TestTimer()
92 TimeBase timeBase = new TimeBase(); in testRunning() local
95 TestTimer timer = new TestTimer(clocks, 0, timeBase); in testRunning()
113 TimeBase timeBase = new TimeBase(); in testParceling() local
117 TestTimer timer1 = new TestTimer(clocks, 0, timeBase); in testParceling()
130 TestTimer timer2 = new TestTimer(clocks, 0, timeBase, parcel); in testParceling()
158 TimeBase timeBase = new TimeBase(); in testResetNoDetach() local
[all …]
DBatteryStatsCounterTest.java34 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testCounter() local
35 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testCounter()
37 final BatteryStatsImpl.Counter counter = new BatteryStatsImpl.Counter(timeBase); in testCounter()
40 timeBase.setRunning(false, 1, 1); in testCounter()
49 timeBase.setRunning(true, 2, 2); in testCounter()
57 timeBase.setRunning(false, 3, 3); in testCounter()
64 timeBase.setRunning(true, 4, 4); in testCounter()
74 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testParceling() local
75 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testParceling()
77 final BatteryStatsImpl.Counter origCounter = new BatteryStatsImpl.Counter(timeBase); in testParceling()
[all …]
DBatteryStatsDurationTimerTest.java38 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testStartStop() local
39 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testStartStop()
42 null, BatteryStats.WAKE_TYPE_PARTIAL, null, timeBase); in testStartStop()
45 timeBase.setRunning(true, /* uptimeUs */ 0, /* realtimeUs */ 100*1000); in testStartStop()
88 timeBase.setRunning(false, /* uptimeUs */ 10, /* realtimeUs */ 55000*1000); in testStartStop()
96 timeBase.setRunning(true, /* uptimeUs */ 10, /* realtimeUs */ 220100*1000); in testStartStop()
110 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testReset() local
111 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testReset()
114 null, BatteryStats.WAKE_TYPE_PARTIAL, null, timeBase); in testReset()
116 timeBase.setRunning(true, /* uptimeUs */ 0, /* realtimeUs */ 100_000); in testReset()
[all …]
DBatteryStatsDualTimerTest.java35 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testResetDetach() local
36 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testResetDetach()
41 null, BatteryStats.WAKE_TYPE_PARTIAL, null, timeBase, subTimeBase); in testResetDetach()
43 assertTrue(timeBase.hasObserver(timer)); in testResetDetach()
45 assertFalse(timeBase.hasObserver(timer.getSubTimer())); in testResetDetach()
52 assertTrue(timeBase.hasObserver(timer)); in testResetDetach()
59 assertFalse(timeBase.hasObserver(timer)); in testResetDetach()
60 assertFalse(timeBase.hasObserver(timer.getSubTimer())); in testResetDetach()
DBatteryStatsSamplingTimerTest.java60 final BatteryStatsImpl.TimeBase timeBase = Mockito.mock(BatteryStatsImpl.TimeBase.class); in testEndSampleAndContinueWhenTimeOrCountDecreases() local
62 timeBase); in testEndSampleAndContinueWhenTimeOrCountDecreases()
103 final BatteryStatsImpl.TimeBase timeBase = Mockito.mock(BatteryStatsImpl.TimeBase.class); in testFirstUpdateIsAbsorbed() local
105 BatteryStatsImpl.SamplingTimer timer = new BatteryStatsImpl.SamplingTimer(clocks, timeBase); in testFirstUpdateIsAbsorbed()
114 timer = new BatteryStatsImpl.SamplingTimer(clocks, timeBase); in testFirstUpdateIsAbsorbed()
145 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testSampleTimerSummaryParceling() local
146 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testSampleTimerSummaryParceling()
148 BatteryStatsImpl.SamplingTimer timer = new BatteryStatsImpl.SamplingTimer(clocks, timeBase); in testSampleTimerSummaryParceling()
153 timeBase.setRunning(true, clocks.uptimeMillis(), clocks.elapsedRealtime()); in testSampleTimerSummaryParceling()
173 timeBase.setRunning(false, clocks.uptimeMillis(), clocks.elapsedRealtime()); in testSampleTimerSummaryParceling()
[all …]
DBatteryStatsStopwatchTimerTest.java35 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testCount() local
36 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testCount()
38 null, BatteryStats.SENSOR, null, timeBase); in testCount()
42 timeBase.setRunning(false, 1000 * clocks.realtime, 1000 * clocks.realtime); in testCount()
63 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testCount()
83 timeBase.setRunning(true, 1000 * clocks.realtime, 1000 * clocks.realtime); in testCount()
105 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testCount()
124 timeBase.setRunning(false, 1000 * clocks.realtime, 1000 * clocks.realtime); in testCount()
130 timeBase.setRunning(true, 1000 * clocks.realtime, 1000 * clocks.realtime); in testCount()
140 timeBase.setRunning(false, 1000 * clocks.realtime, 1000 * clocks.realtime); in testCount()
DBatteryStatsSensorTest.java432 BatteryStatsImpl.TimeBase timeBase = bi.getOnBatteryTimeBase(); in testSensorResetTimes() local
434 timeBase.setRunning(true, clocks.uptime * 1000, clocks.realtime * 1000); in testSensorResetTimes()
442 timeBase.setRunning(false, clocks.uptime * 1000, clocks.realtime * 1000); in testSensorResetTimes()
485 timeBase.setRunning(true, clocks.uptime * 1000, clocks.realtime * 1000); in testSensorResetTimes()
DBatteryStatsCpuTimesTest.java1323 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in getPartialTimers() local
1327 mClocks, u, WAKE_TYPE_PARTIAL, null, timeBase); in getPartialTimers()
/frameworks/base/core/java/com/android/internal/os/
DBatteryStatsImpl.java1337 public Counter(TimeBase timeBase, Parcel in) { in Counter() argument
1338 mTimeBase = timeBase; in Counter()
1340 timeBase.add(this); in Counter()
1343 public Counter(TimeBase timeBase) { in Counter() argument
1344 mTimeBase = timeBase; in Counter()
1345 timeBase.add(this); in Counter()
1382 public static @Nullable Counter readCounterFromParcel(TimeBase timeBase, Parcel in) { in readCounterFromParcel() argument
1386 return new Counter(timeBase, in); in readCounterFromParcel()
1444 private LongSamplingCounterArray(TimeBase timeBase, Parcel in) { in LongSamplingCounterArray() argument
1445 mTimeBase = timeBase; in LongSamplingCounterArray()
[all …]