/frameworks/base/core/java/android/text/format/ |
D | DateUtils.java | 373 public static CharSequence formatDuration(long millis) { in formatDuration() argument 374 return formatDuration(millis, LENGTH_LONG); in formatDuration() 389 public static CharSequence formatDuration(long millis, int abbrev) { in formatDuration() argument 407 if (millis >= HOUR_IN_MILLIS) { in formatDuration() 408 final int hours = (int) ((millis + 1800000) / HOUR_IN_MILLIS); in formatDuration() 410 } else if (millis >= MINUTE_IN_MILLIS) { in formatDuration() 411 final int minutes = (int) ((millis + 30000) / MINUTE_IN_MILLIS); in formatDuration() 414 final int seconds = (int) ((millis + 500) / SECOND_IN_MILLIS); in formatDuration() 800 public static String formatDateTime(Context context, long millis, int flags) { in formatDateTime() argument 801 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/opt/net/wifi/service/java/com/android/server/wifi/ |
D | ConnectedScore.java | 70 public void updateUsingRssi(int rssi, long millis) { in updateUsingRssi() argument 71 updateUsingRssi(rssi, millis, mDefaultRssiStandardDeviation); in updateUsingRssi() 84 public abstract void updateUsingRssi(int rssi, long millis, double standardDeviation); in updateUsingRssi() argument 92 public void updateUsingWifiInfo(WifiInfo wifiInfo, long millis) { in updateUsingWifiInfo() argument 93 updateUsingRssi(wifiInfo.getRssi(), millis); in updateUsingWifiInfo() local
|
D | VelocityBasedConnectedScore.java | 81 public void updateUsingRssi(int rssi, long millis, double standardDeviation) { in updateUsingRssi() argument 82 if (millis <= 0) return; in updateUsingRssi() 83 if (mLastMillis <= 0 || millis < mLastMillis || mFilter.mx == null) { in updateUsingRssi() 88 double dt = (millis - mLastMillis) * 0.001; in updateUsingRssi() 94 mLastMillis = millis; in updateUsingRssi() 103 public void updateUsingWifiInfo(WifiInfo wifiInfo, long millis) { in updateUsingWifiInfo() argument 111 updateUsingRssi(wifiInfo.getRssi(), millis, mDefaultRssiStandardDeviation); in updateUsingWifiInfo() local
|
D | WifiScoreReport.java | 96 long millis = mClock.getWallClockMillis(); in notifyScoreUpdate() local 99 mLastScoreBreachLowTimeMillis = millis; in notifyScoreUpdate() 106 updateWifiMetrics(millis, -1, mScore); in notifyScoreUpdate() 309 long millis = mClock.getWallClockMillis(); in calculateAndReportScore() local 310 mVelocityBasedConnectedScore.updateUsingWifiInfo(mWifiInfo, millis); in calculateAndReportScore() 341 mLastDownwardBreachTimeMillis = millis; in calculateAndReportScore() 346 long elapsedMillis = millis - mLastDownwardBreachTimeMillis; in calculateAndReportScore() 366 updateWifiMetrics(millis, s2, score); in calculateAndReportScore() 434 long millis = mClock.getWallClockMillis(); in shouldCheckIpLayer() local 435 long deltaMillis = millis - mLastKnownNudCheckTimeMillis; in shouldCheckIpLayer() [all …]
|
D | AggressiveConnectedScore.java | 37 public void updateUsingRssi(int rssi, long millis, double standardDeviation) { in updateUsingRssi() argument 42 public void updateUsingWifiInfo(WifiInfo wifiInfo, long millis) { in updateUsingWifiInfo() argument
|
/frameworks/base/core/java/android/os/ |
D | DropBoxManager.java | 116 public Entry(String tag, long millis) { in Entry() argument 120 mTimeMillis = millis; in Entry() 127 public Entry(String tag, long millis, String text) { in Entry() argument 132 mTimeMillis = millis; in Entry() 142 public Entry(String tag, long millis, byte[] data, int flags) { in Entry() argument 149 mTimeMillis = millis; in Entry() 159 public Entry(String tag, long millis, ParcelFileDescriptor data, int flags) { in Entry() argument 166 mTimeMillis = millis; in Entry() 176 public Entry(String tag, long millis, File data, int flags) throws IOException { in Entry() argument 181 mTimeMillis = millis; in Entry() [all …]
|
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 | SystemClock.java | 153 public static boolean setCurrentTimeMillis(long millis) { in setCurrentTimeMillis() argument 162 return mgr.setTime(millis); in setCurrentTimeMillis() 189 public long millis() { in uptimeClock() 212 public long millis() { 310 public long millis() { 327 public long millis() {
|
D | BestClock.java | 46 public long millis() { in millis() method in BestClock 49 return clock.millis(); in millis()
|
/frameworks/base/packages/SystemUI/tests/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/packages/SettingsLib/src/com/android/settingslib/utils/ |
D | StringUtil.java | 52 public static CharSequence formatElapsedTime(Context context, double millis, in formatElapsedTime() argument 55 int seconds = (int) Math.floor(millis / 1000); in formatElapsedTime() 124 public static CharSequence formatRelativeTime(Context context, double millis, in formatRelativeTime() argument 126 final int seconds = (int) Math.floor(millis / 1000); in formatRelativeTime() 171 public static CharSequence formatRelativeTime(Context context, double millis, in formatRelativeTime() argument 173 return formatRelativeTime(context, millis, withSeconds, in formatRelativeTime()
|
/frameworks/base/core/java/android/util/ |
D | TimeUtils.java | 241 int millis = (int)(duration%1000); in formatDurationLocked() local 265 myLen += accumField(millis, 2, true, myLen > 0 ? 3 : 0) + 1; in formatDurationLocked() 282 … pos = printFieldLocked(formatStr, millis, 'm', pos, true, (zeropad && pos != start) ? 3 : 0); in formatDurationLocked() 367 public static String logTimeOfDay(long millis) { in logTimeOfDay() argument 369 if (millis >= 0) { in logTimeOfDay() 370 c.setTimeInMillis(millis); in logTimeOfDay() 373 return Long.toString(millis); in logTimeOfDay() 378 public static String formatForLogging(long millis) { in formatForLogging() argument 379 if (millis <= 0) { in formatForLogging() 382 return sLoggingFormat.format(new Date(millis)); in formatForLogging()
|
/frameworks/base/services/core/java/com/android/server/power/ |
D | AttentionDetector.java | 323 final long millis = DeviceConfig.getLong(NAMESPACE_ATTENTION_MANAGER_SERVICE, in getPreDimCheckDurationMillis() local 327 if (millis < 0 || millis > 13_000) { in getPreDimCheckDurationMillis() 332 return millis; in getPreDimCheckDurationMillis() 338 final long millis = DeviceConfig.getLong(NAMESPACE_ATTENTION_MANAGER_SERVICE, in getPostDimCheckDurationMillis() local 342 if (millis < 0 || millis > 10_000) { in getPostDimCheckDurationMillis() 347 mLastPostDimTimeout = Math.min(millis, dimDurationMillis); in getPostDimCheckDurationMillis()
|
/frameworks/base/location/java/android/location/ |
D | LocationRequest.java | 387 public @NonNull LocationRequest setInterval(long millis) { in setInterval() argument 388 Preconditions.checkArgument(millis >= 0, "invalid interval: + millis"); in setInterval() 389 mInterval = millis; in setInterval() 479 public @NonNull LocationRequest setFastestInterval(long millis) { in setFastestInterval() argument 480 Preconditions.checkArgument(millis >= 0, "invalid interval: + millis"); in setFastestInterval() 482 mFastestInterval = millis; in setFastestInterval() 507 public @NonNull LocationRequest setExpireAt(long millis) { in setExpireAt() argument 508 mExpireAt = Math.max(millis, 0); in setExpireAt() 533 public @NonNull LocationRequest setExpireIn(long millis) { in setExpireIn() argument 534 mExpireIn = millis; in setExpireIn()
|
/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/services/core/jni/ |
D | com_android_server_AlarmManagerService.cpp | 213 … android_server_AlarmManagerService_setKernelTime(JNIEnv*, jobject, jlong nativeData, jlong millis) in android_server_AlarmManagerService_setKernelTime() argument 219 if (millis <= 0 || millis / 1000LL >= INT_MAX) { in android_server_AlarmManagerService_setKernelTime() 223 tv.tv_sec = (time_t) (millis / 1000LL); in android_server_AlarmManagerService_setKernelTime() 224 tv.tv_usec = (suseconds_t) ((millis % 1000LL) * 1000LL); in android_server_AlarmManagerService_setKernelTime() 407 long long millis = nextTimespec.tv_sec * 1000LL; in android_server_AlarmManagerService_getNextAlarm() local 408 millis += (nextTimespec.tv_nsec / 1000000LL); in android_server_AlarmManagerService_getNextAlarm() 409 return static_cast<jlong>(millis); in android_server_AlarmManagerService_getNextAlarm()
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/ |
D | JobSchedulerServiceTest.java | 185 final long now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_minPeriod() 214 final long now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_largePeriod() 235 final long now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_insideWindow() 284 long now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_closeToEndOfWindow() 308 now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_closeToEndOfWindow() 338 now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_closeToEndOfWindow() 375 now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_closeToEndOfWindow() 407 now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_closeToEndOfWindow() 448 final long now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_insideWindow_flex() 482 final long now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_insideWindow_failedJob() [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | KernelCpuThreadReaderEndToEndTest.java | 69 for (int millis = TIMED_START_MILLIS; in testTimedWork() 70 millis <= TIMED_END_MILLIS; in testTimedWork() 71 millis += TIMED_INCREMENT_MILLIS) { in testTimedWork() 72 final Duration targetDuration = Duration.ofMillis(millis); in testTimedWork() 75 work, String.format("timed%dms", millis), TIMED_NUM_SAMPLES); in testTimedWork()
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/controllers/ |
D | QuotaControllerTest.java | 338 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testDeleteObsoleteSessionsLocked() 370 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testOnAppRemovedLocked() 410 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testOnUserRemovedLocked() 447 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testUpdateExecutionStatsLocked_NoTimer() 627 final long now = sElapsedRealtimeClock.millis(); in testUpdateExecutionStatsLocked_WithTimer() 646 expectedStats.expirationTimeElapsed = sElapsedRealtimeClock.millis(); in testUpdateExecutionStatsLocked_WithTimer() 659 createTimingSession(sElapsedRealtimeClock.millis() - (6 * HOUR_IN_MILLIS), in testUpdateExecutionStatsLocked_WithTimer() 663 expectedStats.expirationTimeElapsed = sElapsedRealtimeClock.millis() + 18 * HOUR_IN_MILLIS; in testUpdateExecutionStatsLocked_WithTimer() 670 sElapsedRealtimeClock.millis() + 18 * HOUR_IN_MILLIS + 10 * MINUTE_IN_MILLIS; in testUpdateExecutionStatsLocked_WithTimer() 690 sElapsedRealtimeClock.millis() + expectedStats.windowSizeMs; in testUpdateExecutionStatsLocked_WithTimer() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/ |
D | UtilsTest.java | 139 long millis = 56789; in testToHMS() local 141 long time = (((hours * 60) + minutes) * 60) * 1000 + millis; in testToHMS() 154 long millis = 832077296000L; in testToUTCString() local 157 String result = Utils.toUTCString(millis); in testToUTCString()
|
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/ |
D | JobPackageTracker.java | 67 mEventTimes[index] = sElapsedRealtimeClock.millis(); in addEvent() 136 mStartUptimeTime = sUptimeMillisClock.millis(); in DataSet() 137 mStartElapsedTime = sElapsedRealtimeClock.millis(); in DataSet() 138 mStartClockTime = sSystemClock.millis(); in DataSet() 455 final long now = sUptimeMillisClock.millis(); in notePending() 462 final long now = sUptimeMillisClock.millis(); in noteNonpending() 468 final long now = sUptimeMillisClock.millis(); in noteActive() 481 final long now = sUptimeMillisClock.millis(); in noteInactive() 510 final long now = sUptimeMillisClock.millis(); in getLoadFactor() 524 final long now = sUptimeMillisClock.millis(); in dump() [all …]
|
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/keys/ |
D | TertiaryKeyRotationWindowedCount.java | 76 mEvents.add(mClock.millis()); in record() 93 long now = mClock.millis(); in compact() 104 return mClock.millis() - TimeUnit.HOURS.toMillis(WINDOW_IN_HOURS) + 1; in getMinimumTimestamp()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/time/ |
D | FakeSystemClock.java | 71 public void setCurrentTimeMillis(long millis) { in setCurrentTimeMillis() argument 72 mCurrentTimeMillis = millis; in setCurrentTimeMillis()
|
/frameworks/base/services/core/java/com/android/server/notification/ |
D | SystemConditionProviderService.java | 44 protected static String formatDuration(long millis) { in formatDuration() argument 46 TimeUtils.formatDuration(millis, sb); in formatDuration()
|