/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 | BatteryStatsDurationTimerTest.java | 42 final BatteryStatsImpl.DurationTimer timer = new BatteryStatsImpl.DurationTimer(clocks, in testStartStop() local 47 assertFalse(timer.isRunningLocked()); in testStartStop() 48 assertEquals(0, timer.getCurrentDurationMsLocked(300)); in testStartStop() 49 assertEquals(0, timer.getMaxDurationMsLocked(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() 58 timer.stopRunningLocked(3100); in testStartStop() 59 assertFalse(timer.isRunningLocked()); in testStartStop() [all …]
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | HealthStatsBatteryStatsWriter.java | 51 BatteryStats.Timer timer; in writeUid() local 90 timer = wakelock.getWakeTime(BatteryStats.WAKE_TYPE_FULL); in writeUid() 91 addTimers(uidWriter, UidHealthStats.TIMERS_WAKELOCKS_FULL, key, timer); in writeUid() 94 timer = wakelock.getWakeTime(BatteryStats.WAKE_TYPE_PARTIAL); in writeUid() 95 addTimers(uidWriter, UidHealthStats.TIMERS_WAKELOCKS_PARTIAL, key, timer); in writeUid() 98 timer = wakelock.getWakeTime(BatteryStats.WAKE_TYPE_WINDOW); in writeUid() 99 addTimers(uidWriter, UidHealthStats.TIMERS_WAKELOCKS_WINDOW, key, timer); in writeUid() 102 timer = wakelock.getWakeTime(BatteryStats.WAKE_TYPE_DRAW); in writeUid() 103 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/services/core/java/com/android/server/connectivity/ |
D | NetworkAgentInfo.java | 415 LingerTimer timer = new LingerTimer(request, expiryMs); in lingerRequest() local 416 if (VDBG) Log.d(TAG, "Adding LingerTimer " + timer + " to " + this.name()); in lingerRequest() 417 mLingerTimers.add(timer); in lingerRequest() 418 mLingerTimerForRequest.put(request.requestId, timer); in lingerRequest() 426 LingerTimer timer = mLingerTimerForRequest.get(request.requestId); in unlingerRequest() local 427 if (timer != null) { in unlingerRequest() 428 if (VDBG) Log.d(TAG, "Removing LingerTimer " + timer + " from " + this.name()); in unlingerRequest() 429 mLingerTimers.remove(timer); in unlingerRequest() 490 for (LingerTimer timer : mLingerTimers) { pw.println(timer); } in dumpLingerTimers()
|
/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 | 1165 public static void writeTimerToParcel(Parcel out, Timer timer, long elapsedRealtimeUs) { in writeTimerToParcel() argument 1166 if (timer == null) { in writeTimerToParcel() 1172 timer.writeToParcel(out, elapsedRealtimeUs); in writeTimerToParcel() 2264 SamplingTimer timer = mWakeupReasonStats.get(name); in getWakeupReasonTimerLocked() local 2265 if (timer == null) { in getWakeupReasonTimerLocked() 2266 timer = new SamplingTimer(mClocks, mOnBatteryTimeBase); in getWakeupReasonTimerLocked() 2267 mWakeupReasonStats.put(name, timer); in getWakeupReasonTimerLocked() 2269 return timer; in getWakeupReasonTimerLocked() 3521 SamplingTimer timer = getWakeupReasonTimerLocked(mLastWakeupReason); in aggregateLastWakeupUptimeLocked() local 3522 timer.add(deltaUptime * 1000, 1); // time in in microseconds in aggregateLastWakeupUptimeLocked() [all …]
|
/frameworks/base/docs/html/training/wearables/ui/ |
D | confirm.jd | 30 <dd>Automatic confirmation timers show users an animated timer that lets them cancel an action 44 A confirmation timer.</p> 48 performs the action, your app shows a button to cancel the action with a timer animation and 49 starts the timer. The user has the option to cancel the action until the timer finishes. Your app 50 gets notified if the user cancels the action and when the timer expires.</p> 52 <p>To show a confirmation timer when users complete an action in your app:</p> 61 <li>Set the duration of the timer and start it when the user completes an action.</li> 84 <p>To be notified when the timer finishes or when users tap on it, implement the corresponding 115 <p>To start the timer, add the following code to the point in your activity where users select 121 // Start the timer
|
/frameworks/rs/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/scriptc/ |
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/docs/html/training/wearables/watch-faces/ |
D | drawing.jd | 49 that your watch face needs, including loading bitmap resources, creating timer objects to run 57 <li>Declare variables for a custom timer, graphic objects, and other elements.</li> 61 <li>Initialize the custom timer in the 85 <dt><em>Periodic timer</em></dt> 87 run animations at custom time intervals. In these cases, you need to provide a custom timer that 146 <p>In the example above, the custom timer is implemented as a 148 message queue. For this particular watch face, the custom timer ticks once every second. When the 149 timer ticks, the handler calls the 207 <h3 id="Timer">Initialize the custom timer</h3> 210 providing a custom timer that ticks with the required frequency while the device is in [all …]
|
D | information.jd | 95 <li>Create a custom timer to invoke your task periodically, or notify your watch face service 134 /* get the number of meetings and set the next timer tick */ 152 <h3 id="Timer">Create a custom timer</h3> 154 <p>You can implement a custom timer that ticks periodically to update your data. 181 <p>This method initializes the timer when the watch face becomes visible:</p> 196 <p>The next timer tick is set in the <code>onMeetingsLoaded()</code> method, as shown in the next 225 schedules the next timer tick to run the task again.</p>
|
/frameworks/base/core/java/android/os/ |
D | BatteryStats.java | 2556 private static long computeWakeLock(Timer timer, long elapsedRealtimeUs, int which) { in computeWakeLock() argument 2557 if (timer != null) { in computeWakeLock() 2559 long totalTimeMicros = timer.getTotalTimeLocked(elapsedRealtimeUs, which); in computeWakeLock() 2576 private static final String printWakeLock(StringBuilder sb, Timer timer, in printWakeLock() argument 2579 if (timer != null) { in printWakeLock() 2580 long totalTimeMillis = computeWakeLock(timer, elapsedRealtimeUs, which); in printWakeLock() 2582 int count = timer.getCountLocked(which); in printWakeLock() 2593 final long maxDurationMs = timer.getMaxDurationMsLocked(elapsedRealtimeUs/1000); in printWakeLock() 2598 if (timer.isRunningLocked()) { in printWakeLock() 2599 final long currentMs = timer.getCurrentDurationMsLocked(elapsedRealtimeUs/1000); in printWakeLock() [all …]
|
/frameworks/rs/ |
D | rsScriptC_Lib.cpp | 84 time_t rsrTime(Context *rsc, time_t *timer) { in rsrTime() argument 85 return time(timer); in rsrTime() 88 tm* rsrLocalTime(Context *rsc, tm *local, time_t *timer) { in rsrLocalTime() argument 96 tm *tmp = localtime(timer); in rsrLocalTime()
|
D | rsRuntime.h | 122 time_t rsrTime(Context *, time_t *timer); 123 tm* rsrLocalTime(Context *, tm *local, time_t *timer);
|
/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/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/docs/html/guide/topics/renderscript/reference/ |
D | rs_time.jd | 151 …s:rs_tm'>rs_tm</a>* local, const <a href='rs_time.html#android_rs:rs_time_t'>rs_time_t</a>* timer); 160 <tr><th>timer</th><td>Input time as a number of seconds since January 1, 1970.</td></tr> 169 <p> Converts the time specified by timer into a <a href='rs_time.html#android_rs:rs_tm'>rs_tm</a> s… 188 …:rs_time_t'>rs_time_t</a> rsTime(<a href='rs_time.html#android_rs:rs_time_t'>rs_time_t</a>* timer); 196 <tr><th>timer</th><td>Location to also store the returned calendar time.</td></tr> 208 <p> If timer is non-NULL, the result is also stored in the memory pointed to by
|
/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()
|
/frameworks/base/docs/html/training/wearables/apps/ |
D | voice.jd | 120 <td>Set timer</td> 121 <td>"Ok Google, set a timer for 10 minutes"</td> 128 1 to 86400 (number of seconds in 24 hours) representing the length of the timer </dd>
|
/frameworks/base/docs/html/training/wearables/ |
D | wearable-sounds.jd | 21 trigger a clock or timer alarm, complete with audio notification. Games on Wear become become more
|