/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | BatteryStatsDurationTimerTest.java | 41 final BatteryStatsImpl.DurationTimer timer = new BatteryStatsImpl.DurationTimer(clocks, in testStartStop() local 46 assertFalse(timer.isRunningLocked()); in testStartStop() 47 assertEquals(0, timer.getCurrentDurationMsLocked(300)); in testStartStop() 48 assertEquals(0, timer.getMaxDurationMsLocked(301)); in testStartStop() 49 assertEquals(0, timer.getTotalDurationMsLocked(301)); in testStartStop() 52 timer.startRunningLocked(700); in testStartStop() 53 assertTrue(timer.isRunningLocked()); in testStartStop() 54 assertEquals(800, timer.getCurrentDurationMsLocked(1500)); in testStartStop() 55 assertEquals(801, timer.getMaxDurationMsLocked(1501)); in testStartStop() 56 assertEquals(802, timer.getTotalDurationMsLocked(1502)); in testStartStop() [all …]
|
D | BatteryStatsStopwatchTimerTest.java | 37 final BatteryStatsImpl.StopwatchTimer timer = new BatteryStatsImpl.StopwatchTimer(clocks, in testCount() local 45 timer.startRunningLocked(updateTime(clocks, 100)); // start in testCount() 47 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 48 timer.startRunningLocked(updateTime(clocks, 110)); // start in testCount() 49 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 50 timer.stopRunningLocked(updateTime(clocks, 120)); // stop in testCount() 51 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 52 timer.stopRunningLocked(updateTime(clocks, 130)); // stop in testCount() 53 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 56 timer.startRunningLocked(updateTime(clocks, 200)); // start in testCount() [all …]
|
D | BatteryStatsSamplingTimerTest.java | 34 final BatteryStatsImpl.SamplingTimer timer = new BatteryStatsImpl.SamplingTimer(clocks, in testSettingStalePreservesData() local 37 timer.onTimeStarted(100, 100, 100); in testSettingStalePreservesData() 40 timer.update(10, 1, SystemClock.elapsedRealtime() * 1000); in testSettingStalePreservesData() 42 timer.update(20, 2, SystemClock.elapsedRealtime() * 1000); in testSettingStalePreservesData() 44 assertEquals(1, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData() 45 assertEquals(10, timer.getTotalTimeLocked(200, BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData() 47 timer.endSample(); in testSettingStalePreservesData() 49 assertEquals(1, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData() 50 assertEquals(10, timer.getTotalTimeLocked(200, BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData() 52 timer.onTimeStopped(200, 200, 200); in testSettingStalePreservesData() [all …]
|
D | BatteryStatsTimerTest.java | 96 TestTimer timer = new TestTimer(clocks, 0, timeBase); in testRunning() local 97 timer.nextComputeCurrentCount = 3000; in testRunning() 100 timer.nextComputeRunTime = 4; in testRunning() 101 timer.onTimeStarted(10, 20, 50); in testRunning() 102 timer.nextComputeRunTime = 17; in testRunning() 103 timer.onTimeStopped(100, 130, 170); in testRunning() 104 Assert.assertEquals(170, timer.lastComputeRunTimeRealtime); in testRunning() 105 Assert.assertEquals(17, timer.getTotalTime()); in testRunning() 106 Assert.assertEquals(3000, timer.getCount()); in testRunning() 162 TestTimer timer = new TestTimer(clocks, 0, timeBase); in testResetNoDetach() local [all …]
|
D | BatteryStatsDualTimerTest.java | 40 final BatteryStatsImpl.DualTimer timer = new BatteryStatsImpl.DualTimer(clocks, in testResetDetach() local 43 assertTrue(timeBase.hasObserver(timer)); in testResetDetach() 44 assertFalse(subTimeBase.hasObserver(timer)); in testResetDetach() 45 assertFalse(timeBase.hasObserver(timer.getSubTimer())); in testResetDetach() 46 assertTrue(subTimeBase.hasObserver(timer.getSubTimer())); in testResetDetach() 50 timer.startRunningLocked(clocks.realtime); in testResetDetach() 51 timer.reset(true); in testResetDetach() 52 assertTrue(timeBase.hasObserver(timer)); in testResetDetach() 53 assertTrue(subTimeBase.hasObserver(timer.getSubTimer())); in testResetDetach() 57 timer.stopRunningLocked(clocks.realtime); in testResetDetach() [all …]
|
D | BatteryStatsBackgroundStatsTest.java | 255 BatteryStats.Timer timer = bi.getUidStats().get(UID).getBluetoothScanTimer(); in doTestAppBluetoothScanInternal() local 261 long time = timer.getTotalTimeLocked(curr, STATS_SINCE_CHARGED); in doTestAppBluetoothScanInternal() 262 int count = timer.getCountLocked(STATS_SINCE_CHARGED); in doTestAppBluetoothScanInternal() 264 long actualTime = timer.getTotalDurationMsLocked(clocks.realtime) * 1000; in doTestAppBluetoothScanInternal() 319 BatteryStats.Timer timer = jobs.valueAt(0); in testJob() local 320 BatteryStats.Timer bgTimer = timer.getSubTimer(); in testJob() 321 long time = timer.getTotalTimeLocked(curr, STATS_SINCE_CHARGED); in testJob() 322 int count = timer.getCountLocked(STATS_SINCE_CHARGED); in testJob() 380 BatteryStats.Timer timer = syncs.valueAt(0); in testSyncs() local 381 BatteryStats.Timer bgTimer = timer.getSubTimer(); in testSyncs() [all …]
|
D | BatteryStatsSensorTest.java | 456 BatteryStats.Timer timer = sensor.getSensorTime(); in testSensorResetTimes() local 458 assertEquals(0, timer.getTotalTimeLocked(1000*clocks.realtime, which)); in testSensorResetTimes() 459 assertEquals(0, timer.getTotalDurationMsLocked(clocks.realtime)); in testSensorResetTimes() 469 assertEquals(0, timer.getTotalTimeLocked(1000*clocks.realtime, which)); in testSensorResetTimes() 470 assertEquals(0, timer.getTotalDurationMsLocked(clocks.realtime)); in testSensorResetTimes() 479 assertEquals(0, timer.getTotalTimeLocked(1000*clocks.realtime, which)); in testSensorResetTimes() 480 assertEquals(0, timer.getTotalDurationMsLocked(clocks.realtime)); in testSensorResetTimes() 497 assertEquals(111_000, timer.getTotalTimeLocked(1000*clocks.realtime, which)); in testSensorResetTimes() 498 assertEquals(111, timer.getTotalDurationMsLocked(clocks.realtime)); in testSensorResetTimes() 508 assertEquals(0, timer.getTotalTimeLocked(1000*clocks.realtime, which)); in testSensorResetTimes() [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/tests/servicestests/src/com/android/server/display/ |
D | AmbientBrightnessStatsTrackerTest.java | 367 AmbientBrightnessStatsTracker.Timer timer = new AmbientBrightnessStatsTracker.Timer( in testTimer() local 369 assertEquals(0, timer.totalDurationSec(), 0); in testTimer() 371 assertEquals(0, timer.totalDurationSec(), 0); in testTimer() 372 assertFalse(timer.isRunning()); in testTimer() 374 timer.start(); in testTimer() 375 assertTrue(timer.isRunning()); in testTimer() 376 assertEquals(0, timer.totalDurationSec(), 0); in testTimer() 378 assertTrue(timer.isRunning()); in testTimer() 379 assertEquals(1, timer.totalDurationSec(), 0); in testTimer() 381 timer.reset(); in testTimer() [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 | UsageBasedPowerEstimator.java | 42 public long calculateDuration(BatteryStats.Timer timer, long rawRealtimeUs, int statsType) { in calculateDuration() argument 43 return timer == null ? 0 : timer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000; in calculateDuration()
|
D | SensorPowerCalculator.java | 87 final BatteryStats.Timer timer = sensor.getSensorTime(); in calculateDuration() local 88 durationMs += timer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000; in calculateDuration() 105 final BatteryStats.Timer timer = sensor.getSensorTime(); in calculatePowerMah() local 106 final long sensorTime = timer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000; in calculatePowerMah()
|
D | WakelockPowerCalculator.java | 150 BatteryStats.Timer timer = wakelock.getWakeTime(BatteryStats.WAKE_TYPE_PARTIAL); in calculateApp() local 151 if (timer != null) { in calculateApp() 152 wakeLockTimeUs += timer.getTotalTimeLocked(rawRealtimeUs, statsType); in calculateApp()
|
D | ScreenPowerCalculator.java | 288 final BatteryStats.Timer timer = uid.getForegroundActivityTimer(); in getForegroundActivityTotalTimeUs() local 289 if (timer == null) { in getForegroundActivityTotalTimeUs() 292 return timer.getTotalTimeLocked(rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED); in getForegroundActivityTotalTimeUs()
|
/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/services/core/java/com/android/server/location/contexthub/ |
D | ContextHubClientBroker.java | 642 AuthStateDenialTimer timer; in handleAuthStateTimerExpiry() local 644 timer = mNappToAuthTimerMap.remove(nanoAppId); in handleAuthStateTimerExpiry() 647 if (timer != null) { in handleAuthStateTimerExpiry() 724 AuthStateDenialTimer timer = mNappToAuthTimerMap.remove(nanoAppId); in updateNanoAppAuthState() local 725 if (timer != null) { in updateNanoAppAuthState() 726 timer.cancel(); in updateNanoAppAuthState() 729 AuthStateDenialTimer timer = in updateNanoAppAuthState() local 731 mNappToAuthTimerMap.put(nanoAppId, timer); in updateNanoAppAuthState() 732 timer.start(); in updateNanoAppAuthState()
|
/frameworks/base/core/java/android/os/ |
D | BatteryStats.java | 3365 private static long computeWakeLock(Timer timer, long elapsedRealtimeUs, int which) { in computeWakeLock() argument 3366 if (timer != null) { in computeWakeLock() 3368 long totalTimeMicros = timer.getTotalTimeLocked(elapsedRealtimeUs, which); in computeWakeLock() 3385 private static final String printWakeLock(StringBuilder sb, Timer timer, in printWakeLock() argument 3388 if (timer != null) { in printWakeLock() 3389 long totalTimeMillis = computeWakeLock(timer, elapsedRealtimeUs, which); in printWakeLock() 3391 int count = timer.getCountLocked(which); in printWakeLock() 3402 final long maxDurationMs = timer.getMaxDurationMsLocked(elapsedRealtimeUs/1000); in printWakeLock() 3408 final long totalDurMs = timer.getTotalDurationMsLocked(elapsedRealtimeUs/1000); in printWakeLock() 3413 if (timer.isRunningLocked()) { in printWakeLock() [all …]
|
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/controllers/ |
D | QuotaController.java | 672 Timer timer = timerMap.get(userId, packageName); in prepareForExecutionLocked() local 673 if (timer == null) { in prepareForExecutionLocked() 674 timer = new Timer(uid, userId, packageName, !jobStatus.shouldTreatAsExpeditedJob()); in prepareForExecutionLocked() 675 timerMap.add(userId, packageName, timer); in prepareForExecutionLocked() 677 timer.startTrackingJobLocked(jobStatus); in prepareForExecutionLocked() 683 Timer timer = mPkgTimers.get(jobStatus.getSourceUserId(), jobStatus.getSourcePackageName()); in unprepareFromExecutionLocked() local 684 if (timer != null) { in unprepareFromExecutionLocked() 685 timer.stopTrackingJob(jobStatus); in unprepareFromExecutionLocked() 688 timer = mEJPkgTimers.get(jobStatus.getSourceUserId(), jobStatus.getSourcePackageName()); in unprepareFromExecutionLocked() 689 if (timer != null) { in unprepareFromExecutionLocked() [all …]
|
/frameworks/base/media/mca/filterfw/java/android/filterfw/core/ |
D | GLFrame.java | 141 StopWatchMap timer = GLFrameTimer.get(); in flushGPU() local 142 if (timer.LOG_MFF_RUNNING_TIMES) { in flushGPU() 143 timer.start("glFinish " + message); in flushGPU() 145 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()
|
/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()
|