Home
last modified time | relevance | path

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

1234

/frameworks/base/core/tests/coretests/src/android/text/format/
DDateUtilsTest.java65 assertEquals("0 seconds", DateUtils.formatDuration(0)); in test_formatDuration_seconds()
66 assertEquals("0 seconds", DateUtils.formatDuration(1)); in test_formatDuration_seconds()
67 assertEquals("0 seconds", DateUtils.formatDuration(499)); in test_formatDuration_seconds()
68 assertEquals("1 second", DateUtils.formatDuration(500)); in test_formatDuration_seconds()
69 assertEquals("1 second", DateUtils.formatDuration(1000)); in test_formatDuration_seconds()
70 assertEquals("2 seconds", DateUtils.formatDuration(1500)); in test_formatDuration_seconds()
72 assertEquals("0 seconds", DateUtils.formatDuration(0, DateUtils.LENGTH_LONG)); in test_formatDuration_seconds()
73 assertEquals("1 second", DateUtils.formatDuration(1000, DateUtils.LENGTH_LONG)); in test_formatDuration_seconds()
74 assertEquals("2 seconds", DateUtils.formatDuration(1500, DateUtils.LENGTH_LONG)); in test_formatDuration_seconds()
76 assertEquals("0 sec", DateUtils.formatDuration(0, DateUtils.LENGTH_SHORT)); in test_formatDuration_seconds()
[all …]
/frameworks/base/core/java/android/util/
DTimeUtils.java287 public static void formatDuration(long duration, StringBuilder builder) { in formatDuration() method in TimeUtils
295 public static void formatDuration(long duration, StringBuilder builder, int fieldLen) { in formatDuration() method in TimeUtils
304 public static void formatDuration(long duration, PrintWriter pw, int fieldLen) { in formatDuration() method in TimeUtils
313 public static String formatDuration(long duration) { in formatDuration() method in TimeUtils
322 public static void formatDuration(long duration, PrintWriter pw) { in formatDuration() method in TimeUtils
323 formatDuration(duration, pw, 0); in formatDuration()
327 public static void formatDuration(long time, long now, PrintWriter pw) { in formatDuration() method in TimeUtils
332 formatDuration(time-now, pw, 0); in formatDuration()
395 TimeUtils.formatDuration(time, now, pw); in dumpTimeWithDelta()
/frameworks/base/services/core/java/com/android/server/am/
DBroadcastConstants.java139 TimeUtils.formatDuration(TIMEOUT, pw); in dump()
143 TimeUtils.formatDuration(SLOW_TIME, pw); in dump()
147 TimeUtils.formatDuration(DEFERRAL, pw); in dump()
154 TimeUtils.formatDuration(DEFERRAL_FLOOR, pw); in dump()
157 TimeUtils.formatDuration(ALLOW_BG_ACTIVITY_START_TIMEOUT, pw); in dump()
DBatteryExternalStatsWorker.java598 TimeUtils.formatDuration(totalActiveTimeMs, sb); in extractDeltaLocked()
600 TimeUtils.formatDuration(timePeriodMs, sb); in extractDeltaLocked()
603 TimeUtils.formatDuration(lastIdleMs, sb); in extractDeltaLocked()
605 TimeUtils.formatDuration(lastRxMs, sb); in extractDeltaLocked()
607 TimeUtils.formatDuration(lastTxMs, sb); in extractDeltaLocked()
611 TimeUtils.formatDuration(latest.mControllerIdleTimeMs, sb); in extractDeltaLocked()
613 TimeUtils.formatDuration(latest.mControllerRxTimeMs, sb); in extractDeltaLocked()
615 TimeUtils.formatDuration(latest.mControllerTxTimeMs, sb); in extractDeltaLocked()
DAppTimeTracker.java109 TimeUtils.formatDuration(mTotalTime, pw); in dump()
114 TimeUtils.formatDuration(mPackageTimes.valueAt(i).value, pw); in dump()
119 TimeUtils.formatDuration(SystemClock.elapsedRealtime(), mStartedTime, pw); in dump()
DBroadcastRecord.java148 TimeUtils.formatDuration(dispatchTime, now, pw); in dump()
150 TimeUtils.formatDuration(dispatchClockTime-enqueueClockTime, pw); in dump()
153 pw.print(" finishTime="); TimeUtils.formatDuration(finishTime, now, pw); in dump()
155 TimeUtils.formatDuration(finishTime-dispatchTime, pw); in dump()
158 pw.print(" receiverTime="); TimeUtils.formatDuration(receiverTime, now, pw); in dump()
220 pw.print(" "); TimeUtils.formatDuration(duration[i], pw); in dump()
DServiceRecord.java231 TimeUtils.formatDuration(si.deliveredTime, now, pw); in dumpStartList()
404 TimeUtils.formatDuration(createRealTime, nowReal, pw); in dump()
406 TimeUtils.formatDuration(startingBgTimeout, now, pw); in dump()
409 TimeUtils.formatDuration(lastActivity, now, pw); in dump()
411 TimeUtils.formatDuration(restartTime, now, pw); in dump()
429 TimeUtils.formatDuration(executingStart, now, pw); in dump()
435 TimeUtils.formatDuration(destroyTime, now, pw); in dump()
442 TimeUtils.formatDuration(restartDelay, now, pw); in dump()
444 TimeUtils.formatDuration(nextRestartTime, now, pw); in dump()
DProcessRecord.java373 TimeUtils.formatDuration(lastActivityTime, nowUptime, pw); in dump()
375 TimeUtils.formatDuration(lastPssTime, nowUptime, pw); in dump()
378 TimeUtils.formatDuration(nextPssTime, nowUptime, pw); in dump()
415 TimeUtils.formatDuration(lastStateTime, nowUptime, pw); in dump()
442 TimeUtils.formatDuration(mInteractionEventTime, SystemClock.elapsedRealtime(), pw); in dump()
446 TimeUtils.formatDuration(mFgInteractionTime, SystemClock.elapsedRealtime(), pw); in dump()
461 TimeUtils.formatDuration(lastProviderTime, nowUptime, pw); in dump()
466 TimeUtils.formatDuration(lastTopTime, nowUptime, pw); in dump()
482 TimeUtils.formatDuration(curCpuTime - lastCpuTime, pw); in dump()
485 TimeUtils.formatDuration(mWhenUnimportant - nowUptime, pw); in dump()
[all …]
DBroadcastStats.java132 TimeUtils.formatDuration(ae.mTotalDispatchTime, pw); in dumpStats()
134 TimeUtils.formatDuration(ae.mMaxDispatchTime, pw); in dumpStats()
/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/service/autofill/augmented/
DAugmentedAutofillService.java19 import static android.util.TimeUtils.formatDuration;
499 Log.d(TAG, "Service responded nothing in " + formatDuration(duration)); in report()
513 if (sDebug) Log.d(TAG, "UI shown in " + formatDuration(duration)); in report()
521 if (sDebug) Log.d(TAG, "UI destroyed in " + formatDuration(duration)); in report()
555 formatDuration(responseTime, pw); pw.println(); in dump()
561 formatDuration(uiRenderingTime, pw); pw.println(); in dump()
567 formatDuration(uiTotalTime, pw); pw.println(); in dump()
/frameworks/base/services/core/java/com/android/server/trust/
DTrustArchive.java142 ev.message, formatDuration(ev.duration), dumpGrantFlags(ev.flags)); in dump()
154 public static String formatDuration(long duration) { in formatDuration() method in TrustArchive
156 TimeUtils.formatDuration(duration, sb); in formatDuration()
/frameworks/base/services/usage/java/com/android/server/usage/
DAppIdleHistory.java674 TimeUtils.formatDuration(totalElapsedTime - appUsageHistory.lastUsedElapsedTime, idpw); in dump()
676 TimeUtils.formatDuration(screenOnTime - appUsageHistory.lastUsedScreenTime, idpw); in dump()
678 TimeUtils.formatDuration(totalElapsedTime - appUsageHistory.lastPredictedTime, idpw); in dump()
680 TimeUtils.formatDuration(appUsageHistory.bucketActiveTimeoutTime - totalElapsedTime, in dump()
683 TimeUtils.formatDuration(appUsageHistory.bucketWorkingSetTimeoutTime - totalElapsedTime, in dump()
686 TimeUtils.formatDuration(totalElapsedTime - appUsageHistory.lastJobRunTime, idpw); in dump()
692 TimeUtils.formatDuration(getElapsedTime(elapsedRealtime), idpw); in dump()
695 TimeUtils.formatDuration(getScreenOnTime(elapsedRealtime), idpw); in dump()
DAppStandbyController.java1502 TimeUtils.formatDuration(mCheckIdleIntervalMillis, pw); in dumpState()
1506 TimeUtils.formatDuration(mAppIdleParoleIntervalMillis, pw); in dumpState()
1510 TimeUtils.formatDuration(mAppIdleParoleWindowMillis, pw); in dumpState()
1514 TimeUtils.formatDuration(mAppIdleParoleDurationMillis, pw); in dumpState()
1518 TimeUtils.formatDuration(mStrongUsageTimeoutMillis, pw); in dumpState()
1521 TimeUtils.formatDuration(mNotificationSeenTimeoutMillis, pw); in dumpState()
1524 TimeUtils.formatDuration(mSyncAdapterTimeoutMillis, pw); in dumpState()
1527 TimeUtils.formatDuration(mSystemInteractionTimeoutMillis, pw); in dumpState()
1530 TimeUtils.formatDuration(mInitialForegroundServiceStartTimeoutMillis, pw); in dumpState()
1534 TimeUtils.formatDuration(mPredictionTimeoutMillis, pw); in dumpState()
[all …]
/frameworks/base/services/core/java/com/android/server/
DDeviceIdleController.java1238 TimeUtils.formatDuration(LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT, pw); in dump()
1242 TimeUtils.formatDuration(LIGHT_PRE_IDLE_TIMEOUT, pw); in dump()
1246 TimeUtils.formatDuration(LIGHT_IDLE_TIMEOUT, pw); in dump()
1254 TimeUtils.formatDuration(LIGHT_MAX_IDLE_TIMEOUT, pw); in dump()
1258 TimeUtils.formatDuration(LIGHT_IDLE_MAINTENANCE_MIN_BUDGET, pw); in dump()
1262 TimeUtils.formatDuration(LIGHT_IDLE_MAINTENANCE_MAX_BUDGET, pw); in dump()
1266 TimeUtils.formatDuration(MIN_LIGHT_MAINTENANCE_TIME, pw); in dump()
1270 TimeUtils.formatDuration(MIN_DEEP_MAINTENANCE_TIME, pw); in dump()
1274 TimeUtils.formatDuration(INACTIVE_TIMEOUT, pw); in dump()
1278 TimeUtils.formatDuration(SENSING_TIMEOUT, pw); in dump()
[all …]
DAlarmManagerService.java366 TimeUtils.formatDuration(timestamps.get(j), nowElapsed, pw); in dump()
583 TimeUtils.formatDuration(MIN_FUTURITY, pw); in dump()
587 TimeUtils.formatDuration(MIN_INTERVAL, pw); in dump()
591 TimeUtils.formatDuration(MAX_INTERVAL, pw); in dump()
595 TimeUtils.formatDuration(LISTENER_TIMEOUT, pw); in dump()
599 TimeUtils.formatDuration(ALLOW_WHILE_IDLE_SHORT_TIME, pw); in dump()
603 TimeUtils.formatDuration(ALLOW_WHILE_IDLE_LONG_TIME, pw); in dump()
607 TimeUtils.formatDuration(ALLOW_WHILE_IDLE_WHITELIST_DURATION, pw); in dump()
615 TimeUtils.formatDuration(APP_STANDBY_MIN_DELAYS[i], pw); in dump()
623 TimeUtils.formatDuration(APP_STANDBY_WINDOW, pw); in dump()
[all …]
DNetworkTimeUpdateService.java276 TimeUtils.formatDuration(mPollingIntervalMs, pw); in dump()
278 TimeUtils.formatDuration(mPollingIntervalShorterMs, pw); in dump()
DPreloadsFileCacheExpirationJobService.java60 TimeUtils.formatDuration(keepPreloadsMinTimeoutMs, sb); in schedule()
/frameworks/base/core/java/android/app/job/
DJobInfo.java25 import static android.util.TimeUtils.formatDuration;
1391 Log.w(TAG, "Requested interval " + formatDuration(intervalMillis) + " for job " in setPeriodic()
1392 + mJobId + " is too small; raising to " + formatDuration(minPeriod)); in setPeriodic()
1399 Log.w(TAG, "Requested flex " + formatDuration(flexMillis) + " for job " + mJobId in setPeriodic()
1400 + " is too small; raising to " + formatDuration(minFlex)); in setPeriodic()
1459 Log.w(TAG, "Requested backoff " + formatDuration(initialBackoffMillis) + " for job " in setBackoffCriteria()
1460 + mJobId + " is too small; raising to " + formatDuration(minBackoff)); in setBackoffCriteria()
/frameworks/base/location/java/android/location/
DLocationRequest.java745 TimeUtils.formatDuration(mInterval, s); in toString()
748 TimeUtils.formatDuration(mFastestInterval, s); in toString()
752 TimeUtils.formatDuration(expireIn, s); in toString()
/frameworks/base/services/core/java/com/android/server/job/controllers/
DJobStatus.java1229 TimeUtils.formatDuration(runtime - now, pw); in formatRunTime()
1237 TimeUtils.formatDuration(runtime - now, sb); in formatRunTime()
1458 TimeUtils.formatDuration(job.getIntervalMillis(), pw); in dump()
1459 pw.print(" flex="); TimeUtils.formatDuration(job.getFlexMillis(), pw); in dump()
1496 TimeUtils.formatDuration(job.getTriggerContentUpdateDelay(), pw); in dump()
1501 TimeUtils.formatDuration(job.getTriggerContentMaxDelay(), pw); in dump()
1533 TimeUtils.formatDuration(job.getMinLatencyMillis(), pw); in dump()
1538 TimeUtils.formatDuration(job.getMaxExecutionDelayMillis(), pw); in dump()
1542 pw.print(" initial="); TimeUtils.formatDuration(job.getInitialBackoffMillis(), pw); in dump()
1629 TimeUtils.formatDuration(whenStandbyDeferred, elapsedRealtimeMillis, pw); in dump()
[all …]
DTimeController.java565 TimeUtils.formatDuration(mNextDelayExpiredElapsedMillis, nowElapsed, pw); in dumpControllerStateLocked()
568 TimeUtils.formatDuration(mNextJobExpiredElapsedMillis, nowElapsed, pw); in dumpControllerStateLocked()
582 TimeUtils.formatDuration(ts.getEarliestRunTime(), nowElapsed, pw); in dumpControllerStateLocked()
588 TimeUtils.formatDuration(ts.getLatestRunTimeElapsed(), nowElapsed, pw); in dumpControllerStateLocked()
/frameworks/base/core/java/android/content/
DAsyncTaskLoader.java380 TimeUtils.formatDuration(mUpdateThrottle, writer); in dump()
382 TimeUtils.formatDuration(mLastLoadCompleteTime, in dump()
/frameworks/base/core/java/android/text/format/
DDateUtils.java380 public static CharSequence formatDuration(long millis) { in formatDuration() method in DateUtils
381 return formatDuration(millis, LENGTH_LONG); in formatDuration()
396 public static CharSequence formatDuration(long millis, int abbrev) { in formatDuration() method in DateUtils
/frameworks/base/core/java/android/widget/
DChronometer.java358 private static String formatDuration(long ms) { in formatDuration() method in Chronometer
392 return formatDuration(mNow - mBase); in getContentDescription()

1234