Home
last modified time | relevance | path

Searched refs:timesA (Results 1 – 2 of 2) sorted by relevance

/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBatteryStatsImplTest.java290 long[] timesA = null; in testAddCpuTimes() local
292 assertNull(mBatteryStatsImpl.addCpuTimes(timesA, timesB)); in testAddCpuTimes()
294 timesA = new long[] {34, 23, 45, 24}; in testAddCpuTimes()
295 assertArrayEquals(timesA, mBatteryStatsImpl.addCpuTimes(timesA, timesB)); in testAddCpuTimes()
297 timesB = timesA; in testAddCpuTimes()
298 timesA = null; in testAddCpuTimes()
299 assertArrayEquals(timesB, mBatteryStatsImpl.addCpuTimes(timesA, timesB)); in testAddCpuTimes()
302 timesA = new long[timesB.length]; in testAddCpuTimes()
303 for (int i = 0; i < timesA.length; ++i) { in testAddCpuTimes()
304 timesA[i] = expected[i] - timesB[i]; in testAddCpuTimes()
[all …]
/frameworks/base/core/java/com/android/internal/os/
DBatteryStatsImpl.java561 public long[] addCpuTimes(long[] timesA, long[] timesB) { in addCpuTimes() argument
562 if (timesA != null && timesB != null) { in addCpuTimes()
563 for (int i = timesA.length - 1; i >= 0; --i) { in addCpuTimes()
564 timesA[i] += timesB[i]; in addCpuTimes()
566 return timesA; in addCpuTimes()
568 return timesA == null ? (timesB == null ? null : timesB) : timesA; in addCpuTimes()