/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | BatteryStatsTimerTest.java | 142 TestTimer timer = new TestTimer(clocks, 0, timeBase); in testRunning() local 143 timer.nextComputeCurrentCount = 3000; in testRunning() 146 timer.nextComputeRunTime = 4; in testRunning() 147 timer.onTimeStarted(10, 20, 50); in testRunning() 148 Assert.assertEquals(50, timer.lastComputeRunTimeRealtime); in testRunning() 149 Assert.assertEquals(4, timer.getUnpluggedTime()); in testRunning() 150 Assert.assertEquals(3000, timer.getUnpluggedCount()); in testRunning() 153 timer.nextComputeRunTime = 17; in testRunning() 154 timer.onTimeStopped(100, 130, 170); in testRunning() 155 Assert.assertEquals(17, timer.getTotalTime()); in testRunning() [all …]
|
D | BatteryStatsSamplingTimerTest.java | 31 final BatteryStatsImpl.SamplingTimer timer = new BatteryStatsImpl.SamplingTimer(clocks, in testSettingStalePreservesData() local 34 timer.onTimeStarted(100, 100, 100); in testSettingStalePreservesData() 37 timer.update(10, 1); in testSettingStalePreservesData() 39 timer.update(20, 2); in testSettingStalePreservesData() 41 assertEquals(1, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData() 42 assertEquals(10, timer.getTotalTimeLocked(200, BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData() 44 timer.endSample(); in testSettingStalePreservesData() 46 assertEquals(1, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData() 47 assertEquals(10, timer.getTotalTimeLocked(200, BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData() 49 timer.onTimeStopped(200, 200, 200); in testSettingStalePreservesData() [all …]
|
D | BatteryStatsStopwatchTimerTest.java | 35 final BatteryStatsImpl.StopwatchTimer timer = new BatteryStatsImpl.StopwatchTimer(clocks, in testCount() local 43 timer.startRunningLocked(updateTime(clocks, 100)); // start in testCount() 45 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 46 timer.startRunningLocked(updateTime(clocks, 110)); // start in testCount() 47 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 48 timer.stopRunningLocked(updateTime(clocks, 120)); // stop in testCount() 49 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 50 timer.stopRunningLocked(updateTime(clocks, 130)); // stop in testCount() 51 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 54 timer.startRunningLocked(updateTime(clocks, 200)); // start in testCount() [all …]
|
D | BatteryStatsDurationTimerTest.java | 39 final BatteryStatsImpl.DurationTimer timer = new BatteryStatsImpl.DurationTimer(clocks, in testStartStop() local 44 assertFalse(timer.isRunningLocked()); in testStartStop() 45 assertEquals(0, timer.getCurrentDurationMsLocked(300)); in testStartStop() 46 assertEquals(0, timer.getMaxDurationMsLocked(301)); in testStartStop() 47 assertEquals(0, timer.getTotalDurationMsLocked(301)); in testStartStop() 50 timer.startRunningLocked(700); in testStartStop() 51 assertTrue(timer.isRunningLocked()); in testStartStop() 52 assertEquals(800, timer.getCurrentDurationMsLocked(1500)); in testStartStop() 53 assertEquals(801, timer.getMaxDurationMsLocked(1501)); in testStartStop() 54 assertEquals(802, timer.getTotalDurationMsLocked(1502)); in testStartStop() [all …]
|
D | BatteryStatsDualTimerTest.java | 38 final BatteryStatsImpl.DualTimer timer = new BatteryStatsImpl.DualTimer(clocks, in testResetDetach() local 41 assertTrue(timeBase.hasObserver(timer)); in testResetDetach() 42 assertFalse(subTimeBase.hasObserver(timer)); in testResetDetach() 43 assertFalse(timeBase.hasObserver(timer.getSubTimer())); in testResetDetach() 44 assertTrue(subTimeBase.hasObserver(timer.getSubTimer())); in testResetDetach() 48 timer.startRunningLocked(clocks.realtime); in testResetDetach() 49 timer.reset(true); in testResetDetach() 50 assertTrue(timeBase.hasObserver(timer)); in testResetDetach() 51 assertTrue(subTimeBase.hasObserver(timer.getSubTimer())); in testResetDetach() 55 timer.stopRunningLocked(clocks.realtime); in testResetDetach() [all …]
|
D | BatteryStatsBackgroundStatsTest.java | 242 BatteryStats.Timer timer = bi.getUidStats().get(UID).getBluetoothScanTimer(); in testAppBluetoothScan() local 248 long time = timer.getTotalTimeLocked(curr, STATS_SINCE_CHARGED); in testAppBluetoothScan() 249 int count = timer.getCountLocked(STATS_SINCE_CHARGED); in testAppBluetoothScan() 251 long actualTime = timer.getTotalDurationMsLocked(clocks.realtime) * 1000; in testAppBluetoothScan() 306 BatteryStats.Timer timer = jobs.valueAt(0); in testJob() local 307 BatteryStats.Timer bgTimer = timer.getSubTimer(); in testJob() 308 long time = timer.getTotalTimeLocked(curr, STATS_SINCE_CHARGED); in testJob() 309 int count = timer.getCountLocked(STATS_SINCE_CHARGED); in testJob() 367 BatteryStats.Timer timer = syncs.valueAt(0); in testSyncs() local 368 BatteryStats.Timer bgTimer = timer.getSubTimer(); in testSyncs() [all …]
|
/frameworks/rs/tests/lldb/tests/ |
D | run_test.py | 181 timer = Timer(interval, on_timeout) 182 timer.start() 183 atexit.register(Timer.stop, timer) 184 return timer 187 def _quit_test(num, timer): argument 195 if timer: 196 timer.stop() 269 timer = None 310 timer = _initialise_timer(android, args.timeout) 335 timer, [all …]
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | HealthStatsBatteryStatsWriter.java | 52 BatteryStats.Timer timer; in writeUid() local 91 timer = wakelock.getWakeTime(BatteryStats.WAKE_TYPE_FULL); in writeUid() 92 addTimers(uidWriter, UidHealthStats.TIMERS_WAKELOCKS_FULL, key, timer); in writeUid() 95 timer = wakelock.getWakeTime(BatteryStats.WAKE_TYPE_PARTIAL); in writeUid() 96 addTimers(uidWriter, UidHealthStats.TIMERS_WAKELOCKS_PARTIAL, key, timer); in writeUid() 99 timer = wakelock.getWakeTime(BatteryStats.WAKE_TYPE_WINDOW); in writeUid() 100 addTimers(uidWriter, UidHealthStats.TIMERS_WAKELOCKS_WINDOW, key, timer); in writeUid() 103 timer = wakelock.getWakeTime(BatteryStats.WAKE_TYPE_DRAW); in writeUid() 104 addTimers(uidWriter, UidHealthStats.TIMERS_WAKELOCKS_DRAW, key, timer); in writeUid() 458 private void addTimer(HealthStatsWriter writer, int key, BatteryStats.Timer timer) { in addTimer() argument [all …]
|
/frameworks/base/core/java/com/android/internal/os/ |
D | CameraPowerCalculator.java | 38 final BatteryStats.Timer timer = u.getCameraTurnedOnTimer(); in calculateApp() local 39 if (timer != null) { in calculateApp() 40 final long totalTime = timer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000; in calculateApp()
|
D | FlashlightPowerCalculator.java | 36 final BatteryStats.Timer timer = u.getFlashlightTurnedOnTimer(); in calculateApp() local 37 if (timer != null) { in calculateApp() 38 final long totalTime = timer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000; in calculateApp()
|
D | WakelockPowerCalculator.java | 44 BatteryStats.Timer timer = wakelock.getWakeTime(BatteryStats.WAKE_TYPE_PARTIAL); in calculateApp() local 45 if (timer != null) { in calculateApp() 46 wakeLockTimeUs += timer.getTotalTimeLocked(rawRealtimeUs, statsType); in calculateApp()
|
D | SensorPowerCalculator.java | 43 final BatteryStats.Timer timer = sensor.getSensorTime(); in calculateApp() local 44 final long sensorTime = timer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000; in calculateApp()
|
D | BatteryStatsImpl.java | 1365 public static void writeTimerToParcel(Parcel out, Timer timer, long elapsedRealtimeUs) { in writeTimerToParcel() argument 1366 if (timer == null) { in writeTimerToParcel() 1372 timer.writeToParcel(out, elapsedRealtimeUs); in writeTimerToParcel() 2595 SamplingTimer timer = mWakeupReasonStats.get(name); in getWakeupReasonTimerLocked() local 2596 if (timer == null) { in getWakeupReasonTimerLocked() 2597 timer = new SamplingTimer(mClocks, mOnBatteryTimeBase); in getWakeupReasonTimerLocked() 2598 mWakeupReasonStats.put(name, timer); in getWakeupReasonTimerLocked() 2600 return timer; in getWakeupReasonTimerLocked() 3904 SamplingTimer timer = getWakeupReasonTimerLocked(mLastWakeupReason); in aggregateLastWakeupUptimeLocked() local 3905 timer.add(deltaUptime * 1000, 1); // time in in microseconds in aggregateLastWakeupUptimeLocked() [all …]
|
/frameworks/base/services/core/java/com/android/server/connectivity/ |
D | NetworkAgentInfo.java | 476 LingerTimer timer = new LingerTimer(request, expiryMs); in lingerRequest() local 477 if (VDBG) Log.d(TAG, "Adding LingerTimer " + timer + " to " + this.name()); in lingerRequest() 478 mLingerTimers.add(timer); in lingerRequest() 479 mLingerTimerForRequest.put(request.requestId, timer); in lingerRequest() 487 LingerTimer timer = mLingerTimerForRequest.get(request.requestId); in unlingerRequest() local 488 if (timer != null) { in unlingerRequest() 489 if (VDBG) Log.d(TAG, "Removing LingerTimer " + timer + " from " + this.name()); in unlingerRequest() 490 mLingerTimers.remove(timer); in unlingerRequest() 551 for (LingerTimer timer : mLingerTimers) { pw.println(timer); } in dumpLingerTimers()
|
/frameworks/rs/script_api/ |
D | rs_time.spec | 65 arg: const rs_time_t* timer, "Input time as a number of seconds since January 1, 1970." 68 Converts the time specified by timer into a @rs_tm structure that provides year, month, 78 arg: rs_time_t* timer, "Location to also store the returned calendar time." 83 If timer is non-NULL, the result is also stored in the memory pointed to by
|
/frameworks/rs/script_api/include/ |
D | rs_time.rsh | 73 * Converts the time specified by timer into a rs_tm structure that provides year, month, 81 * timer: Input time as a number of seconds since January 1, 1970. 86 rsLocaltime(rs_tm* local, const rs_time_t* timer); 93 * If timer is non-NULL, the result is also stored in the memory pointed to by 97 * timer: Location to also store the returned calendar time. 102 rsTime(rs_time_t* timer);
|
/frameworks/base/core/java/android/os/ |
D | BatteryStats.java | 2691 private static long computeWakeLock(Timer timer, long elapsedRealtimeUs, int which) { in computeWakeLock() argument 2692 if (timer != null) { in computeWakeLock() 2694 long totalTimeMicros = timer.getTotalTimeLocked(elapsedRealtimeUs, which); in computeWakeLock() 2711 private static final String printWakeLock(StringBuilder sb, Timer timer, in printWakeLock() argument 2714 if (timer != null) { in printWakeLock() 2715 long totalTimeMillis = computeWakeLock(timer, elapsedRealtimeUs, which); in printWakeLock() 2717 int count = timer.getCountLocked(which); in printWakeLock() 2728 final long maxDurationMs = timer.getMaxDurationMsLocked(elapsedRealtimeUs/1000); in printWakeLock() 2734 final long totalDurMs = timer.getTotalDurationMsLocked(elapsedRealtimeUs/1000); in printWakeLock() 2739 if (timer.isRunningLocked()) { in printWakeLock() [all …]
|
/frameworks/base/media/mca/filterfw/java/android/filterfw/core/ |
D | GLFrame.java | 145 StopWatchMap timer = GLFrameTimer.get(); in flushGPU() local 146 if (timer.LOG_MFF_RUNNING_TIMES) { in flushGPU() 147 timer.start("glFinish " + message); in flushGPU() 149 timer.stop("glFinish " + message); in flushGPU()
|
/frameworks/rs/tests/lldb/tests/harness/ |
D | test_base_remote.py | 32 def __init__(self, device_port, device, timer, *args, **kwargs): argument 33 super(TestBaseRemote, self).__init__(device_port, device, timer, *args, **kwargs)
|
D | test_base.py | 44 def __init__(self, device_port, device, timer, app_type, wimpy=False, **kwargs): argument 50 self._timer = timer # timer instance, to check whether the test froze
|
/frameworks/rs/ |
D | rsScriptC_Lib.cpp | 78 time_t rsrTime(Context *rsc, time_t *timer) { in rsrTime() argument 79 return time(timer); in rsrTime() 82 tm* rsrLocalTime(Context *rsc, tm *local, time_t *timer) { in rsrLocalTime() argument 90 tm *tmp = localtime(timer); in rsrLocalTime()
|
D | rsRuntime.h | 118 time_t rsrTime(Context *, time_t *timer); 119 tm* rsrLocalTime(Context *, tm *local, time_t *timer);
|
/frameworks/base/tools/orientationplot/ |
D | orientationplot.py | 182 self.timer = self.fig.canvas.new_timer(interval=100) 183 self.timer.add_callback(lambda: self.update()) 184 self.timer.start() 193 self.timer.stop() 196 self.timer.start()
|
/frameworks/base/tools/velocityplot/ |
D | velocityplot.py | 117 self.timer = self.fig.canvas.new_timer(interval=100) 118 self.timer.add_callback(lambda: self.update()) 119 self.timer.start()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/location/ |
D | LocationBasedCountryDetectorTest.java | 354 Timer timer = detector.getTimer(); in waitForTimerReset() local 355 assertTrue(timer == null); in waitForTimerReset()
|