Home
last modified time | relevance | path

Searched refs:formatDuration (Results 1 – 25 of 65) sorted by relevance

123

/frameworks/base/core/tests/coretests/src/android/text/format/
DDateUtilsTest.java27 assertEquals("0 seconds", DateUtils.formatDuration(0)); in test_formatDuration_seconds()
28 assertEquals("0 seconds", DateUtils.formatDuration(1)); in test_formatDuration_seconds()
29 assertEquals("0 seconds", DateUtils.formatDuration(499)); in test_formatDuration_seconds()
30 assertEquals("1 second", DateUtils.formatDuration(500)); in test_formatDuration_seconds()
31 assertEquals("1 second", DateUtils.formatDuration(1000)); in test_formatDuration_seconds()
32 assertEquals("2 seconds", DateUtils.formatDuration(1500)); in test_formatDuration_seconds()
38 assertEquals("59 seconds", DateUtils.formatDuration(59000)); in test_formatDuration_Minutes()
39 assertEquals("60 seconds", DateUtils.formatDuration(59500)); in test_formatDuration_Minutes()
40 assertEquals("1 minute", DateUtils.formatDuration(60000)); in test_formatDuration_Minutes()
41 assertEquals("2 minutes", DateUtils.formatDuration(120000)); in test_formatDuration_Minutes()
[all …]
/frameworks/base/core/java/com/android/internal/os/
DKernelUidCpuTimeReader.java103 TimeUtils.formatDuration(timeDiffUs / 1000, sb); in readDelta()
106 TimeUtils.formatDuration(mLastUserTimeUs.valueAt(index) / 1000, sb); in readDelta()
108 TimeUtils.formatDuration(mLastSystemTimeUs.valueAt(index) / 1000, sb); in readDelta()
113 TimeUtils.formatDuration(userTimeUs / 1000, sb); in readDelta()
115 TimeUtils.formatDuration(systemTimeUs / 1000, sb); in readDelta()
119 TimeUtils.formatDuration(userTimeDeltaUs / 1000, sb); in readDelta()
121 TimeUtils.formatDuration(systemTimeDeltaUs / 1000, sb); in readDelta()
/frameworks/support/v4/java/android/support/v4/util/
DTimeUtils.java147 public static void formatDuration(long duration, StringBuilder builder) { in formatDuration() method in TimeUtils
155 public static void formatDuration(long duration, PrintWriter pw, int fieldLen) { in formatDuration() method in TimeUtils
163 public static void formatDuration(long duration, PrintWriter pw) { in formatDuration() method in TimeUtils
164 formatDuration(duration, pw, 0); in formatDuration()
168 public static void formatDuration(long time, long now, PrintWriter pw) { in formatDuration() method in TimeUtils
173 formatDuration(time-now, pw, 0); in formatDuration()
/frameworks/base/services/core/java/com/android/server/notification/
DSystemConditionProviderService.java44 protected static String formatDuration(long millis) { in formatDuration() method in SystemConditionProviderService
46 TimeUtils.formatDuration(millis, sb); in formatDuration()
53 pw.printf("%s, in %s, now=%s", ts(time), formatDuration(time - now), ts(now)); in dumpUpcomingTime()
/frameworks/base/core/java/android/util/
DTimeUtils.java389 public static void formatDuration(long duration, StringBuilder builder) { in formatDuration() method in TimeUtils
397 public static void formatDuration(long duration, PrintWriter pw, int fieldLen) { in formatDuration() method in TimeUtils
405 public static void formatDuration(long duration, PrintWriter pw) { in formatDuration() method in TimeUtils
406 formatDuration(duration, pw, 0); in formatDuration()
410 public static void formatDuration(long time, long now, PrintWriter pw) { in formatDuration() method in TimeUtils
415 formatDuration(time-now, pw, 0); in formatDuration()
/frameworks/base/services/core/java/com/android/server/
DDeviceIdleController.java863 TimeUtils.formatDuration(LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT, pw); in dump()
867 TimeUtils.formatDuration(LIGHT_PRE_IDLE_TIMEOUT, pw); in dump()
871 TimeUtils.formatDuration(LIGHT_IDLE_TIMEOUT, pw); in dump()
879 TimeUtils.formatDuration(LIGHT_MAX_IDLE_TIMEOUT, pw); in dump()
883 TimeUtils.formatDuration(LIGHT_IDLE_MAINTENANCE_MIN_BUDGET, pw); in dump()
887 TimeUtils.formatDuration(LIGHT_IDLE_MAINTENANCE_MAX_BUDGET, pw); in dump()
891 TimeUtils.formatDuration(MIN_LIGHT_MAINTENANCE_TIME, pw); in dump()
895 TimeUtils.formatDuration(MIN_DEEP_MAINTENANCE_TIME, pw); in dump()
899 TimeUtils.formatDuration(INACTIVE_TIMEOUT, pw); in dump()
903 TimeUtils.formatDuration(SENSING_TIMEOUT, pw); in dump()
[all …]
DNetworkTimeUpdateService.java336 TimeUtils.formatDuration(mPollingIntervalMs, pw); in dump()
338 TimeUtils.formatDuration(mPollingIntervalShorterMs, pw); in dump()
341 TimeUtils.formatDuration(mTimeErrorThresholdMs, pw); in dump()
344 TimeUtils.formatDuration(mLastNtpFetchTime, pw); in dump()
DAlarmManagerService.java303 TimeUtils.formatDuration(MIN_FUTURITY, pw); in dump()
307 TimeUtils.formatDuration(MIN_INTERVAL, pw); in dump()
311 TimeUtils.formatDuration(LISTENER_TIMEOUT, pw); in dump()
315 TimeUtils.formatDuration(ALLOW_WHILE_IDLE_SHORT_TIME, pw); in dump()
319 TimeUtils.formatDuration(ALLOW_WHILE_IDLE_LONG_TIME, pw); in dump()
323 TimeUtils.formatDuration(ALLOW_WHILE_IDLE_WHITELIST_DURATION, pw); in dump()
1381 TimeUtils.formatDuration(mLastTimeChangeRealtime, pw); in dumpImpl()
1385 TimeUtils.formatDuration(nowELAPSED - mNonInteractiveStartTime, pw); in dumpImpl()
1388 TimeUtils.formatDuration(currentNonWakeupFuzzLocked(nowELAPSED), pw); in dumpImpl()
1391 TimeUtils.formatDuration(nowELAPSED - mLastAlarmDeliveryTime, pw); in dumpImpl()
[all …]
/frameworks/base/services/core/java/com/android/server/am/
DAppTimeTracker.java107 TimeUtils.formatDuration(mTotalTime, pw); in dump()
112 TimeUtils.formatDuration(mPackageTimes.valueAt(i).value, pw); in dump()
117 TimeUtils.formatDuration(SystemClock.elapsedRealtime(), mStartedTime, pw); in dump()
DServiceRecord.java185 TimeUtils.formatDuration(si.deliveredTime, now, pw); in dumpStartList()
241 TimeUtils.formatDuration(createTime, nowReal, pw); in dump()
243 TimeUtils.formatDuration(startingBgTimeout, now, pw); in dump()
246 TimeUtils.formatDuration(lastActivity, now, pw); in dump()
248 TimeUtils.formatDuration(restartTime, now, pw); in dump()
261 TimeUtils.formatDuration(executingStart, now, pw); in dump()
267 TimeUtils.formatDuration(destroyTime, now, pw); in dump()
274 TimeUtils.formatDuration(restartDelay, now, pw); in dump()
276 TimeUtils.formatDuration(nextRestartTime, now, pw); in dump()
DBroadcastRecord.java130 TimeUtils.formatDuration(dispatchTime, now, pw); in dump()
132 TimeUtils.formatDuration(dispatchClockTime-enqueueClockTime, pw); in dump()
135 pw.print(" finishTime="); TimeUtils.formatDuration(finishTime, now, pw); in dump()
137 TimeUtils.formatDuration(finishTime-dispatchTime, pw); in dump()
140 pw.print(" receiverTime="); TimeUtils.formatDuration(receiverTime, now, pw); in dump()
DProcessRecord.java264 TimeUtils.formatDuration(lastActivityTime, now, pw); in dump()
266 TimeUtils.formatDuration(lastPssTime, now, pw); in dump()
268 TimeUtils.formatDuration(nextPssTime, now, pw); in dump()
301 TimeUtils.formatDuration(lastStateTime, now, pw); in dump()
319 TimeUtils.formatDuration(interactionEventTime, SystemClock.elapsedRealtime(), pw); in dump()
323 TimeUtils.formatDuration(fgInteractionTime, SystemClock.elapsedRealtime(), pw); in dump()
338 TimeUtils.formatDuration(lastProviderTime, now, pw); in dump()
352 TimeUtils.formatDuration(wtime-lastWakeTime, pw); pw.println(""); in dump()
355 TimeUtils.formatDuration(curCpuTime-lastCpuTime, pw); pw.println(""); in dump()
358 TimeUtils.formatDuration(lastRequestedGc, now, pw); in dump()
[all …]
DBroadcastStats.java113 TimeUtils.formatDuration(ae.mTotalDispatchTime, pw); in dumpStats()
115 TimeUtils.formatDuration(ae.mMaxDispatchTime, pw); in dumpStats()
DUidRecord.java69 TimeUtils.formatDuration(SystemClock.elapsedRealtime()-lastBackgroundTime, sb); in toString()
DBatteryStatsService.java1350 TimeUtils.formatDuration(totalActiveTimeMs, sb); in extractDelta()
1352 TimeUtils.formatDuration(timePeriodMs, sb); in extractDelta()
1355 TimeUtils.formatDuration(lastIdleMs, sb); in extractDelta()
1357 TimeUtils.formatDuration(lastRxMs, sb); in extractDelta()
1359 TimeUtils.formatDuration(lastTxMs, sb); in extractDelta()
1363 TimeUtils.formatDuration(latest.mControllerIdleTimeMs, sb); in extractDelta()
1365 TimeUtils.formatDuration(latest.mControllerRxTimeMs, sb); in extractDelta()
1367 TimeUtils.formatDuration(latest.mControllerTxTimeMs, sb); in extractDelta()
DContentProviderConnection.java92 TimeUtils.formatDuration(nowReal-createTime, sb); in toClientString()
/frameworks/base/services/core/java/com/android/server/job/controllers/
DTimeController.java295 TimeUtils.formatDuration(mNextDelayExpiredElapsedMillis, nowElapsed, pw); in dumpControllerStateLocked()
298 TimeUtils.formatDuration(mNextJobExpiredElapsedMillis, nowElapsed, pw); in dumpControllerStateLocked()
313 TimeUtils.formatDuration(ts.getEarliestRunTime(), nowElapsed, pw); in dumpControllerStateLocked()
319 TimeUtils.formatDuration(ts.getLatestRunTimeElapsed(), nowElapsed, pw); in dumpControllerStateLocked()
DJobStatus.java589 TimeUtils.formatDuration(job.getIntervalMillis(), pw); in dump()
590 pw.print(" flex="); TimeUtils.formatDuration(job.getFlexMillis(), pw); in dump()
616 TimeUtils.formatDuration(job.getTriggerContentUpdateDelay(), pw); in dump()
621 TimeUtils.formatDuration(job.getTriggerContentMaxDelay(), pw); in dump()
630 TimeUtils.formatDuration(job.getMinLatencyMillis(), pw); in dump()
635 TimeUtils.formatDuration(job.getMaxExecutionDelayMillis(), pw); in dump()
639 pw.print(" initial="); TimeUtils.formatDuration(job.getInitialBackoffMillis(), pw); in dump()
/frameworks/base/core/java/android/app/job/
DJobInfo.java19 import static android.util.TimeUtils.formatDuration;
828 formatDuration(mIntervalMillis, builder); in build()
830 formatDuration(job.getIntervalMillis(), builder); in build()
838 formatDuration(mFlexMillis, builder); in build()
840 formatDuration(job.getFlexMillis(), builder); in build()
/frameworks/base/services/core/java/com/android/server/trust/
DTrustArchive.java134 ev.message, formatDuration(ev.duration), dumpGrantFlags(ev.flags)); in dump()
146 public static String formatDuration(long duration) { in formatDuration() method in TrustArchive
148 TimeUtils.formatDuration(duration, sb); in formatDuration()
/frameworks/base/location/java/android/location/
DLocationRequest.java657 TimeUtils.formatDuration(mInterval, s); in toString()
660 TimeUtils.formatDuration(mFastestInterval, s); in toString()
664 TimeUtils.formatDuration(expireIn, s); in toString()
/frameworks/base/services/usage/java/com/android/server/usage/
DAppIdleHistory.java387 TimeUtils.formatDuration(totalElapsedTime - packageHistory.lastUsedElapsedTime, idpw); in dump()
389 TimeUtils.formatDuration(screenOnTime - packageHistory.lastUsedScreenTime, idpw); in dump()
395 TimeUtils.formatDuration(getElapsedTimeLocked(elapsedRealtime), idpw); in dump()
398 TimeUtils.formatDuration(getScreenOnTimeLocked(elapsedRealtime), idpw); in dump()
/frameworks/support/v4/java/android/support/v4/content/
DAsyncTaskLoader.java354 TimeUtils.formatDuration(mUpdateThrottle, writer); in dump()
356 TimeUtils.formatDuration(mLastLoadCompleteTime, in dump()
/frameworks/base/core/java/android/content/
DAsyncTaskLoader.java370 TimeUtils.formatDuration(mUpdateThrottle, writer); in dump()
372 TimeUtils.formatDuration(mLastLoadCompleteTime, in dump()
/frameworks/base/core/java/android/widget/
DChronometer.java324 private static String formatDuration(long ms) { in formatDuration() method in Chronometer
373 return formatDuration(mNow - mBase); in getContentDescription()

123