Home
last modified time | relevance | path

Searched refs:timeBase (Results 1 – 10 of 10) 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()
93 TimeBase timeBase = new TimeBase(); in testRunning() local
96 TestTimer timer = new TestTimer(clocks, 0, timeBase); in testRunning()
114 TimeBase timeBase = new TimeBase(); in testParceling() local
118 TestTimer timer1 = new TestTimer(clocks, 0, timeBase); in testParceling()
131 TestTimer timer2 = new TestTimer(clocks, 0, timeBase, parcel); in testParceling()
159 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.java62 final BatteryStatsImpl.TimeBase timeBase = Mockito.mock(BatteryStatsImpl.TimeBase.class); in testEndSampleAndContinueWhenTimeOrCountDecreases() local
64 timeBase); in testEndSampleAndContinueWhenTimeOrCountDecreases()
105 final BatteryStatsImpl.TimeBase timeBase = Mockito.mock(BatteryStatsImpl.TimeBase.class); in testFirstUpdateIsAbsorbed() local
107 BatteryStatsImpl.SamplingTimer timer = new BatteryStatsImpl.SamplingTimer(clocks, timeBase); in testFirstUpdateIsAbsorbed()
116 timer = new BatteryStatsImpl.SamplingTimer(clocks, timeBase); in testFirstUpdateIsAbsorbed()
147 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testSampleTimerSummaryParceling() local
148 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testSampleTimerSummaryParceling()
150 BatteryStatsImpl.SamplingTimer timer = new BatteryStatsImpl.SamplingTimer(clocks, timeBase); in testSampleTimerSummaryParceling()
155 timeBase.setRunning(true, clocks.uptimeMillis(), clocks.elapsedRealtime()); in testSampleTimerSummaryParceling()
175 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.java1322 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in getPartialTimers() local
1326 mClocks, u, WAKE_TYPE_PARTIAL, null, timeBase); in getPartialTimers()
/frameworks/base/core/java/com/android/internal/os/
DBatteryStatsImpl.java1464 public Counter(TimeBase timeBase, Parcel in) { in Counter() argument
1465 mTimeBase = timeBase; in Counter()
1467 timeBase.add(this); in Counter()
1470 public Counter(TimeBase timeBase) { in Counter() argument
1471 mTimeBase = timeBase; in Counter()
1472 timeBase.add(this); in Counter()
1510 public static Counter readCounterFromParcel(TimeBase timeBase, Parcel in) { in readCounterFromParcel() argument
1514 return new Counter(timeBase, in); in readCounterFromParcel()
1572 private LongSamplingCounterArray(TimeBase timeBase, Parcel in) { in LongSamplingCounterArray() argument
1573 mTimeBase = timeBase; in LongSamplingCounterArray()
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/
DVSyncPredictorTest.cpp442 constexpr nsecs_t timeBase = 100_years; in TEST_F() local
445 tracker.addVsyncTimestamp(timeBase + i * mPeriod); in TEST_F()