/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/controllers/ |
D | JobStatusTest.java | 432 final long now = sElapsedRealtimeClock.millis(); in testFraction() 854 job.setChargingConstraintSatisfied(sElapsedRealtimeClock.millis(), false); in testWouldBeReadyWithConstraint_RequestedCharging() 856 job.setChargingConstraintSatisfied(sElapsedRealtimeClock.millis(), true); in testWouldBeReadyWithConstraint_RequestedCharging() 860 job.setChargingConstraintSatisfied(sElapsedRealtimeClock.millis(), false); in testWouldBeReadyWithConstraint_RequestedCharging() 862 job.setChargingConstraintSatisfied(sElapsedRealtimeClock.millis(), true); in testWouldBeReadyWithConstraint_RequestedCharging() 875 job.setIdleConstraintSatisfied(sElapsedRealtimeClock.millis(), false); in testWouldBeReadyWithConstraint_RequestedDeviceIdle() 877 job.setIdleConstraintSatisfied(sElapsedRealtimeClock.millis(), true); in testWouldBeReadyWithConstraint_RequestedDeviceIdle() 881 job.setIdleConstraintSatisfied(sElapsedRealtimeClock.millis(), false); in testWouldBeReadyWithConstraint_RequestedDeviceIdle() 883 job.setIdleConstraintSatisfied(sElapsedRealtimeClock.millis(), true); in testWouldBeReadyWithConstraint_RequestedDeviceIdle() 896 job.setBatteryNotLowConstraintSatisfied(sElapsedRealtimeClock.millis(), false); in testWouldBeReadyWithConstraint_RequestedBatteryNotLow() [all …]
|
D | PrefetchControllerTest.java | 198 js.setDeviceNotDozingConstraintSatisfied(/* nowElapsed */ sElapsedRealtimeClock.millis(), in createJobStatus() 201 sElapsedRealtimeClock.millis(), true, false); in createJobStatus() 202 js.setQuotaConstraintSatisfied(sElapsedRealtimeClock.millis(), true); in createJobStatus() 203 js.setExpeditedJobQuotaApproved(sElapsedRealtimeClock.millis(), true); in createJobStatus() 204 js.setFlexibilityConstraintSatisfied(sElapsedRealtimeClock.millis(), true); in createJobStatus() 276 .thenReturn(sSystemClock.millis() + launchDelayMs); in testConstantsUpdating_ThresholdChangesAlarms() 284 anyInt(), eq(sElapsedRealtimeClock.millis() + 4 * HOUR_IN_MILLIS), in testConstantsUpdating_ThresholdChangesAlarms() 290 anyInt(), eq(sElapsedRealtimeClock.millis() + 8 * HOUR_IN_MILLIS), in testConstantsUpdating_ThresholdChangesAlarms() 302 .thenReturn(sSystemClock.millis() + 10 * HOUR_IN_MILLIS); in testConstraintNotSatisfiedWhenLaunchLate() 317 .thenReturn(sSystemClock.millis() + MINUTE_IN_MILLIS); in testConstraintSatisfiedWhenLaunchSoon() [all …]
|
D | QuotaControllerTest.java | 409 js.setDeviceNotDozingConstraintSatisfied(/* nowElapsed */ sElapsedRealtimeClock.millis(), in createJobStatus() 412 sElapsedRealtimeClock.millis(), true, false); in createJobStatus() 413 js.setFlexibilityConstraintSatisfied(sElapsedRealtimeClock.millis(), true); in createJobStatus() 479 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testDeleteObsoleteSessionsLocked() 525 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testOnAppRemovedLocked() 584 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testOnUserRemovedLocked() 641 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testUpdateExecutionStatsLocked_NoTimer() 871 expectedStats.expirationTimeElapsed = sElapsedRealtimeClock.millis(); in testUpdateExecutionStatsLocked_WithTimer() 887 createTimingSession(sElapsedRealtimeClock.millis() - (6 * HOUR_IN_MILLIS), in testUpdateExecutionStatsLocked_WithTimer() 891 expectedStats.expirationTimeElapsed = sElapsedRealtimeClock.millis() + 18 * HOUR_IN_MILLIS; in testUpdateExecutionStatsLocked_WithTimer() [all …]
|
/frameworks/base/core/java/android/text/format/ |
D | DateUtils.java | 384 public static CharSequence formatDuration(long millis) { in formatDuration() argument 385 return formatDuration(millis, LENGTH_LONG); in formatDuration() 400 public static CharSequence formatDuration(long millis, int abbrev) { in formatDuration() argument 418 if (millis >= HOUR_IN_MILLIS) { in formatDuration() 419 final int hours = (int) ((millis + 1800000) / HOUR_IN_MILLIS); in formatDuration() 421 } else if (millis >= MINUTE_IN_MILLIS) { in formatDuration() 422 final int minutes = (int) ((millis + 30000) / MINUTE_IN_MILLIS); in formatDuration() 425 final int seconds = (int) ((millis + 500) / SECOND_IN_MILLIS); in formatDuration() 811 public static String formatDateTime(Context context, long millis, int flags) { in formatDateTime() argument 812 return formatDateRange(context, millis, millis, flags); in formatDateTime() [all …]
|
D | Time.java | 762 public void set(long millis) { in set() argument 765 calculator.setTimeInMillis(millis); in set() 954 long millis = time.toMillis(true); in isEpoch() local 955 return getJulianDay(millis, 0 /* UTC offset */) == EPOCH_JULIAN_DAY; in isEpoch() 979 public static int getJulianDay(long millis, long gmtoffSeconds) { in getJulianDay() argument 981 long adjustedMillis = millis + offsetMillis; in getJulianDay() 1014 long millis = (julianDay - EPOCH_JULIAN_DAY) * DateUtils.DAY_IN_MILLIS; in setJulianDay() local 1015 set(millis); in setJulianDay() 1019 int approximateDay = getJulianDay(millis, gmtoff); in setJulianDay() 1027 millis = normalize(true); in setJulianDay() [all …]
|
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/util/time/ |
D | FakeSystemClock.java | 70 public void setCurrentTimeMillis(long millis) { in setCurrentTimeMillis() argument 71 mCurrentTimeMillis = millis; in setCurrentTimeMillis() 74 public void setElapsedRealtime(long millis) { in setElapsedRealtime() argument 75 mElapsedRealtime = millis; in setElapsedRealtime() 85 public void advanceTime(long millis) { in advanceTime() argument 86 advanceTime(millis, 0); in advanceTime()
|
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/util/io/ |
D | FakeBasicFileAttributes.java | 82 public FakeBasicFileAttributes setLastModifiedTime(long millis) { in setLastModifiedTime() argument 83 mLastModifiedTime = FileTime.from(millis, TimeUnit.MILLISECONDS); in setLastModifiedTime() 87 public FakeBasicFileAttributes setLastAccessTime(long millis) { in setLastAccessTime() argument 88 mLastAccessTime = FileTime.from(millis, TimeUnit.MILLISECONDS); in setLastAccessTime() 92 public FakeBasicFileAttributes setCreationTime(long millis) { in setCreationTime() argument 93 mCreationTime = FileTime.from(millis, TimeUnit.MILLISECONDS); in setCreationTime()
|
/frameworks/base/core/java/android/os/ |
D | SimpleClock.java | 40 public long millis() { in withZone() 41 return SimpleClock.this.millis(); in withZone() 47 public abstract long millis(); 51 return Instant.ofEpochMilli(millis());
|
D | DropBoxManager.java | 130 public Entry(@NonNull String tag, @CurrentTimeMillisLong long millis) { in Entry() argument 134 mTimeMillis = millis; in Entry() 141 public Entry(@NonNull String tag, @CurrentTimeMillisLong long millis, in Entry() argument 147 mTimeMillis = millis; in Entry() 157 public Entry(@NonNull String tag, @CurrentTimeMillisLong long millis, in Entry() argument 165 mTimeMillis = millis; in Entry() 175 public Entry(@NonNull String tag, @CurrentTimeMillisLong long millis, in Entry() argument 183 mTimeMillis = millis; in Entry() 193 public Entry(@NonNull String tag, @CurrentTimeMillisLong long millis, in Entry() argument 199 mTimeMillis = millis; in Entry() [all …]
|
D | SystemClock.java | 165 public static boolean setCurrentTimeMillis(long millis) { in setCurrentTimeMillis() argument 173 return mgr.setTime(millis); in setCurrentTimeMillis() 229 public long millis() { in uptimeClock() 258 public long millis() { 391 public long millis() { 408 public long millis() {
|
D | BestClock.java | 46 public long millis() { in millis() method in BestClock 49 return clock.millis(); in millis()
|
/frameworks/base/services/core/java/com/android/server/power/ |
D | AttentionDetector.java | 326 final long millis = DeviceConfig.getLong(NAMESPACE_ATTENTION_MANAGER_SERVICE, in getPreDimCheckDurationMillis() local 330 if (millis < 0 || millis > 13_000) { in getPreDimCheckDurationMillis() 335 return millis; in getPreDimCheckDurationMillis() 341 final long millis = DeviceConfig.getLong(NAMESPACE_ATTENTION_MANAGER_SERVICE, in getPostDimCheckDurationMillis() local 345 if (millis < 0 || millis > 10_000) { in getPostDimCheckDurationMillis() 349 return millis; in getPostDimCheckDurationMillis() 355 final long millis = DeviceConfig.getLong(NAMESPACE_ATTENTION_MANAGER_SERVICE, in getMaxExtensionMillis() local 359 if (millis < 0 || millis > 60 * 60 * 1000) { // 1 hour in getMaxExtensionMillis() 364 return millis; in getMaxExtensionMillis()
|
/frameworks/base/services/core/jni/ |
D | com_android_server_SystemClockTime.cpp | 94 jlong millis) { in com_android_server_SystemClockTime_setTime() argument 97 if (millis <= 0 || millis / 1000LL >= std::numeric_limits<time_t>::max()) { in com_android_server_SystemClockTime_setTime() 102 tv.tv_sec = (millis / 1000LL); in com_android_server_SystemClockTime_setTime() 103 tv.tv_usec = ((millis % 1000LL) * 1000LL); in com_android_server_SystemClockTime_setTime()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/utils/ |
D | StringUtil.java | 59 public static CharSequence formatElapsedTime(Context context, double millis, in formatElapsedTime() argument 62 int seconds = (int) Math.floor(millis / 1000); in formatElapsedTime() 137 public static CharSequence formatRelativeTime(Context context, double millis, in formatRelativeTime() argument 139 final int seconds = (int) Math.floor(millis / 1000); in formatRelativeTime() 184 public static CharSequence formatRelativeTime(Context context, double millis, in formatRelativeTime() argument 186 return formatRelativeTime(context, millis, withSeconds, in formatRelativeTime()
|
/frameworks/base/core/tests/coretests/src/android/text/format/ |
D | TimeTest.java | 216 long millis = local.toMillis(true /* ignore isDst */); in testNormalize1() local 217 local.set(millis); in testNormalize1() 261 long millis = local.toMillis(false /* use isDst */); in testNormalize1() local 262 local.set(millis); in testNormalize1() 547 long millis = time.normalize(true); in disableTestGetJulianDay() local 553 int julianDay = Time.getJulianDay(millis, time.gmtoff); in disableTestGetJulianDay() 560 millis = time.normalize(true); in disableTestGetJulianDay() 561 int day = Time.getJulianDay(millis, time.gmtoff); in disableTestGetJulianDay() 588 long millis = time.normalize(true); in disableTestSetJulianDay() local 592 int julianDay = Time.getJulianDay(millis, time.gmtoff); in disableTestSetJulianDay() [all …]
|
/frameworks/base/core/java/android/util/ |
D | TimeUtils.java | 275 int millis = (int)(duration%1000); in formatDurationLocked() local 299 myLen += accumField(millis, 2, true, myLen > 0 ? 3 : 0) + 1; in formatDurationLocked() 316 … pos = printFieldLocked(formatStr, millis, 'm', pos, true, (zeropad && pos != start) ? 3 : 0); in formatDurationLocked() 421 public static String logTimeOfDay(long millis) { in logTimeOfDay() argument 423 if (millis >= 0) { in logTimeOfDay() 424 c.setTimeInMillis(millis); in logTimeOfDay() 427 return Long.toString(millis); in logTimeOfDay() 433 public static String formatForLogging(long millis) { in formatForLogging() argument 434 if (millis <= 0) { in formatForLogging() 437 return sLoggingFormat.format(new Date(millis)); in formatForLogging()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | KernelCpuThreadReaderEndToEndTest.java | 75 for (int millis = TIMED_START_MILLIS; in testTimedWork() 76 millis <= TIMED_END_MILLIS; in testTimedWork() 77 millis += TIMED_INCREMENT_MILLIS) { in testTimedWork() 78 final Duration targetDuration = Duration.ofMillis(millis); in testTimedWork() 81 work, String.format("timed%dms", millis), TIMED_NUM_SAMPLES); in testTimedWork()
|
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/controllers/ |
D | PrefetchController.java | 161 final long now = sSystemClock.millis(); in maybeStartTrackingJobLocked() 162 final long nowElapsed = sElapsedRealtimeClock.millis(); in maybeStartTrackingJobLocked() 219 return getNextEstimatedLaunchTimeLocked(userId, pkgName, sSystemClock.millis()); in getNextEstimatedLaunchTimeLocked() 262 final long now = sSystemClock.millis(); in maybeUpdateConstraintForUid() 263 final long nowElapsed = sElapsedRealtimeClock.millis(); in maybeUpdateConstraintForUid() 289 + TimeUtils.formatDuration(newEstimatedLaunchTime - sSystemClock.millis()) in processUpdatedEstimatedLaunchTime() 309 final long now = sSystemClock.millis(); in processUpdatedEstimatedLaunchTime() 310 final long nowElapsed = sElapsedRealtimeClock.millis(); in processUpdatedEstimatedLaunchTime() 409 final long nowElapsed = sElapsedRealtimeClock.millis(); in onConstantsUpdatedLocked() 410 final long now = sSystemClock.millis(); in onConstantsUpdatedLocked() [all …]
|
D | TimeController.java | 99 final long nowElapsedMillis = sElapsedRealtimeClock.millis(); in maybeStartTrackingJobLocked() 148 final long nowElapsedMillis = sElapsedRealtimeClock.millis(); in evaluateStateLocked() 222 final long nowElapsedMillis = sElapsedRealtimeClock.millis(); in checkExpiredDeadlinesAndResetAlarm() 285 final long nowElapsedMillis = sElapsedRealtimeClock.millis(); in checkExpiredDelaysAndResetAlarm() 378 return Math.max(proposedAlarmTimeElapsedMillis, sElapsedRealtimeClock.millis()); in maybeAdjustAlarmTime() 414 mLastFiredDelayExpiredElapsedMillis = sElapsedRealtimeClock.millis(); 422 final long nowElapsed = sElapsedRealtimeClock.millis(); in dumpControllerStateLocked() 466 final long nowElapsed = sElapsedRealtimeClock.millis(); in dumpControllerStateLocked()
|
/frameworks/base/location/java/android/location/ |
D | LocationRequest.java | 380 public @NonNull LocationRequest setInterval(long millis) { in setInterval() argument 381 Preconditions.checkArgument(millis >= 0); in setInterval() 384 if (millis == PASSIVE_INTERVAL) { in setInterval() 385 millis = Long.MAX_VALUE - 1; in setInterval() 388 mIntervalMillis = millis; in setInterval() 427 public @NonNull LocationRequest setFastestInterval(long millis) { in setFastestInterval() argument 428 Preconditions.checkArgument(millis >= 0); in setFastestInterval() 429 mMinUpdateIntervalMillis = millis; in setFastestInterval() 449 public @NonNull LocationRequest setExpireAt(long millis) { in setExpireAt() argument 450 mExpireAtRealtimeMillis = max(millis, 0); in setExpireAt() [all …]
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | OomAdjusterDebugLogger.java | 56 private void maybeSleep(int millis) { in maybeSleep() argument 57 if (millis == 0) { in maybeSleep() 61 Thread.sleep(millis); in maybeSleep()
|
/frameworks/base/core/java/com/android/internal/os/ |
D | IDropBoxManagerService.aidl | 39 DropBoxManager.Entry getNextEntry(String tag, long millis, String packageName); in getNextEntry() argument 41 DropBoxManager.Entry getNextEntryWithAttribution(String tag, long millis, String packageName, in getNextEntryWithAttribution() argument
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/ |
D | JobSchedulerServiceTest.java | 408 sUptimeMillisClock.millis() - mService.mConstants.RUNTIME_MIN_UI_GUARANTEE_MS; in testGetMinJobExecutionGuaranteeMs_timeoutSafeguards_disabled() 436 sUptimeMillisClock.millis() - mService.mConstants.RUNTIME_MIN_EJ_GUARANTEE_MS; in testGetMinJobExecutionGuaranteeMs_timeoutSafeguards_disabled() 464 sUptimeMillisClock.millis() - mService.mConstants.RUNTIME_MIN_GUARANTEE_MS; in testGetMinJobExecutionGuaranteeMs_timeoutSafeguards_disabled() 527 jobUij.madeActive = sUptimeMillisClock.millis() - 1; in testGetMinJobExecutionGuaranteeMs_timeoutSafeguards_enabled() 542 sUptimeMillisClock.millis() - mService.mConstants.RUNTIME_MIN_UI_GUARANTEE_MS; in testGetMinJobExecutionGuaranteeMs_timeoutSafeguards_enabled() 570 sUptimeMillisClock.millis() - mService.mConstants.RUNTIME_MIN_EJ_GUARANTEE_MS; in testGetMinJobExecutionGuaranteeMs_timeoutSafeguards_enabled() 598 sUptimeMillisClock.millis() - mService.mConstants.RUNTIME_MIN_GUARANTEE_MS; in testGetMinJobExecutionGuaranteeMs_timeoutSafeguards_enabled() 699 sUptimeMillisClock.millis() - mService.mConstants.RUNTIME_MIN_UI_GUARANTEE_MS; in testGetMaxJobExecutionTimeMs_timeoutSafeguards_disabled() 727 sUptimeMillisClock.millis() - mService.mConstants.RUNTIME_MIN_EJ_GUARANTEE_MS; in testGetMaxJobExecutionTimeMs_timeoutSafeguards_disabled() 755 sUptimeMillisClock.millis() - mService.mConstants.RUNTIME_MIN_GUARANTEE_MS; in testGetMaxJobExecutionTimeMs_timeoutSafeguards_disabled() [all …]
|
/frameworks/base/services/tests/vibrator/utils/com/android/server/vibrator/ |
D | FakeVibratorControllerProvider.java | 247 public void setCompletionCallbackDelay(long millis) { in setCompletionCallbackDelay() argument 248 mCompletionCallbackDelay = millis; in setCompletionCallbackDelay() 255 public void setOnLatency(long millis) { in setOnLatency() argument 256 mOnLatency = millis; in setOnLatency() 260 public void setOffLatency(long millis) { in setOffLatency() argument 261 mOffLatency = millis; in setOffLatency()
|
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/ |
D | JobPackageTracker.java | 66 mEventTimes[index] = sElapsedRealtimeClock.millis(); in addEvent() 135 mStartUptimeTime = sUptimeMillisClock.millis(); in DataSet() 136 mStartElapsedTime = sElapsedRealtimeClock.millis(); in DataSet() 137 mStartClockTime = sSystemClock.millis(); in DataSet() 468 final long now = sUptimeMillisClock.millis(); in notePending() 475 final long now = sUptimeMillisClock.millis(); in noteNonpending() 481 final long now = sUptimeMillisClock.millis(); in noteActive() 494 final long now = sUptimeMillisClock.millis(); in noteInactive() 523 final long now = sUptimeMillisClock.millis(); in getLoadFactor() 537 final long now = sUptimeMillisClock.millis(); in dump() [all …]
|