Home
last modified time | relevance | path

Searched refs:millis (Results 1 – 25 of 96) sorted by relevance

1234

/frameworks/base/core/java/android/text/format/
DDateUtils.java380 public static CharSequence formatDuration(long millis) { in formatDuration() argument
381 return formatDuration(millis, LENGTH_LONG); in formatDuration()
396 public static CharSequence formatDuration(long millis, int abbrev) { in formatDuration() argument
414 if (millis >= HOUR_IN_MILLIS) { in formatDuration()
415 final int hours = (int) ((millis + 1800000) / HOUR_IN_MILLIS); in formatDuration()
417 } else if (millis >= MINUTE_IN_MILLIS) { in formatDuration()
418 final int minutes = (int) ((millis + 30000) / MINUTE_IN_MILLIS); in formatDuration()
421 final int seconds = (int) ((millis + 500) / SECOND_IN_MILLIS); in formatDuration()
803 public static String formatDateTime(Context context, long millis, int flags) { in formatDateTime() argument
804 return formatDateRange(context, millis, millis, flags); in formatDateTime()
[all …]
DTime.java761 public void set(long millis) { in set() argument
764 calculator.setTimeInMillis(millis); in set()
950 long millis = time.toMillis(true); in isEpoch() local
951 return getJulianDay(millis, 0) == EPOCH_JULIAN_DAY; in isEpoch()
972 public static int getJulianDay(long millis, long gmtoff) { in getJulianDay() argument
974 long julianDay = (millis + offsetMillis) / DateUtils.DAY_IN_MILLIS; in getJulianDay()
1002 long millis = (julianDay - EPOCH_JULIAN_DAY) * DateUtils.DAY_IN_MILLIS; in setJulianDay() local
1003 set(millis); in setJulianDay()
1007 int approximateDay = getJulianDay(millis, gmtoff); in setJulianDay()
1015 millis = normalize(true); in setJulianDay()
[all …]
DFormatter.java227 public static String formatShortElapsedTime(Context context, long millis) { in formatShortElapsedTime() argument
228 long secondsLong = millis / 1000; in formatShortElapsedTime()
283 public static String formatShortElapsedTimeRoundingUpToMinutes(Context context, long millis) { in formatShortElapsedTimeRoundingUpToMinutes() argument
284 long minutesRoundedUp = (millis + MILLIS_PER_MINUTE - 1) / MILLIS_PER_MINUTE; in formatShortElapsedTimeRoundingUpToMinutes()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DConnectedScore.java70 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
DVelocityBasedConnectedScore.java80 public void updateUsingRssi(int rssi, long millis, double standardDeviation) { in updateUsingRssi() argument
81 if (millis <= 0) return; in updateUsingRssi()
82 if (mLastMillis <= 0 || millis < mLastMillis || mFilter.mx == null) { in updateUsingRssi()
87 double dt = (millis - mLastMillis) * 0.001; in updateUsingRssi()
93 mLastMillis = millis; in updateUsingRssi()
102 public void updateUsingWifiInfo(WifiInfo wifiInfo, long millis) { in updateUsingWifiInfo() argument
110 updateUsingRssi(wifiInfo.getRssi(), millis, mDefaultRssiStandardDeviation); in updateUsingWifiInfo() local
DWifiScoreReport.java103 long millis = mClock.getWallClockMillis(); in calculateAndReportScore() local
113 mAggressiveConnectedScore.updateUsingWifiInfo(wifiInfo, millis); in calculateAndReportScore()
114 mVelocityBasedConnectedScore.updateUsingWifiInfo(wifiInfo, millis); in calculateAndReportScore()
144 mLastDownwardBreachTimeMillis = millis; in calculateAndReportScore()
149 long elapsedMillis = millis - mLastDownwardBreachTimeMillis; in calculateAndReportScore()
163 logLinkMetrics(wifiInfo, millis, netId, s1, s2, score); in calculateAndReportScore()
200 long millis = mClock.getWallClockMillis(); in shouldCheckIpLayer() local
201 long deltaMillis = millis - mLastKnownNudCheckTimeMillis; in shouldCheckIpLayer()
233 long millis = mClock.getWallClockMillis(); in noteIpCheck() local
234 mLastKnownNudCheckTimeMillis = millis; in noteIpCheck()
DAggressiveConnectedScore.java37 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/
DDropBoxManager.java116 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 …]
DSimpleClock.java40 public long millis() { in withZone()
41 return SimpleClock.this.millis(); in withZone()
47 public abstract long millis();
51 return Instant.ofEpochMilli(millis());
DSystemClock.java153 public static boolean setCurrentTimeMillis(long millis) { in setCurrentTimeMillis() argument
162 return mgr.setTime(millis); in setCurrentTimeMillis()
197 public long millis() { in uptimeClock()
220 public long millis() {
318 public long millis() {
335 public long millis() {
DBestClock.java46 public long millis() { in millis() method in BestClock
49 return clock.millis(); in millis()
/frameworks/base/location/java/android/location/
DLocationRequest.java338 public @NonNull LocationRequest setInterval(long millis) { in setInterval() argument
339 checkInterval(millis); in setInterval()
340 mInterval = millis; in setInterval()
435 public @NonNull LocationRequest setFastestInterval(long millis) { in setFastestInterval() argument
436 checkInterval(millis); in setFastestInterval()
438 mFastestInterval = millis; in setFastestInterval()
471 public @NonNull LocationRequest setExpireIn(long millis) { in setExpireIn() argument
475 if (millis > Long.MAX_VALUE - elapsedRealtime) { in setExpireIn()
478 mExpireAt = millis + elapsedRealtime; in setExpireIn()
499 public @NonNull LocationRequest setExpireAt(long millis) { in setExpireAt() argument
[all …]
/frameworks/base/core/java/android/util/
DTimeUtils.java240 int millis = (int)(duration%1000); in formatDurationLocked() local
264 myLen += accumField(millis, 2, true, myLen > 0 ? 3 : 0) + 1; in formatDurationLocked()
281 … pos = printFieldLocked(formatStr, millis, 'm', pos, true, (zeropad && pos != start) ? 3 : 0); in formatDurationLocked()
356 public static String logTimeOfDay(long millis) { in logTimeOfDay() argument
358 if (millis >= 0) { in logTimeOfDay()
359 c.setTimeInMillis(millis); in logTimeOfDay()
362 return Long.toString(millis); in logTimeOfDay()
367 public static String formatForLogging(long millis) { in formatForLogging() argument
368 if (millis <= 0) { in formatForLogging()
371 return sLoggingFormat.format(new Date(millis)); in formatForLogging()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/utils/
DStringUtil.java52 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/tests/coretests/src/android/text/format/
DTimeTest.java216 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/
Dcom_android_server_AlarmManagerService.cpp201 … android_server_AlarmManagerService_setKernelTime(JNIEnv*, jobject, jlong nativeData, jlong millis) in android_server_AlarmManagerService_setKernelTime() argument
205 if (millis <= 0 || millis / 1000LL >= std::numeric_limits<time_t>::max()) { in android_server_AlarmManagerService_setKernelTime()
210 tv.tv_sec = (millis / 1000LL); in android_server_AlarmManagerService_setKernelTime()
211 tv.tv_usec = ((millis % 1000LL) * 1000LL); in android_server_AlarmManagerService_setKernelTime()
342 long long millis = nextTimespec.tv_sec * 1000LL; in android_server_AlarmManagerService_getNextAlarm() local
343 millis += (nextTimespec.tv_nsec / 1000000LL); in android_server_AlarmManagerService_getNextAlarm()
344 return static_cast<jlong>(millis); in android_server_AlarmManagerService_getNextAlarm()
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DKernelCpuThreadReaderEndToEndTest.java69 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/
DJobSchedulerServiceTest.java171 final long now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_minPeriod()
200 final long now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_largePeriod()
221 final long now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_insideWindow()
270 long now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_closeToEndOfWindow()
294 now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_closeToEndOfWindow()
324 now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_closeToEndOfWindow()
361 now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_closeToEndOfWindow()
393 now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_closeToEndOfWindow()
434 final long now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_insideWindow_flex()
468 final long now = sElapsedRealtimeClock.millis(); in testGetRescheduleJobForPeriodic_insideWindow_failedJob()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/controllers/
DQuotaControllerTest.java334 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testDeleteObsoleteSessionsLocked()
366 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testOnAppRemovedLocked()
406 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testOnUserRemovedLocked()
443 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testUpdateExecutionStatsLocked_NoTimer()
626 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testGetExecutionStatsLocked_Values()
703 advanceElapsedClock(-JobSchedulerService.sElapsedRealtimeClock.millis()); in testGetExecutionStatsLocked_Values_BeginningOfTime()
757 JobSchedulerService.sElapsedRealtimeClock.millis(), in testGetExecutionStatsLocked_CoalescingSessions()
764 JobSchedulerService.sElapsedRealtimeClock.millis(), in testGetExecutionStatsLocked_CoalescingSessions()
770 JobSchedulerService.sElapsedRealtimeClock.millis(), 500, 1)); in testGetExecutionStatsLocked_CoalescingSessions()
775 JobSchedulerService.sElapsedRealtimeClock.millis(), 100, 1)); in testGetExecutionStatsLocked_CoalescingSessions()
[all …]
DTimeControllerTest.java180 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in runTestMaybeStartTrackingJobLocked_DelayInOrder()
207 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testMaybeStartTrackingJobLocked_DelayInOrder_WithSkipping_SomeNotReady()
256 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in runTestMaybeStartTrackingJobLocked_DelayReverseOrder()
285 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testMaybeStartTrackingJobLocked_DelayReverseOrder_WithSkipping_SomeNotReady()
336 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in runTestMaybeStartTrackingJobLocked_DeadlineInOrder()
363 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testMaybeStartTrackingJobLocked_DeadlineInOrder_WithSkipping_SomeNotReady()
412 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in runTestMaybeStartTrackingJobLocked_DeadlineReverseOrder()
444 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testMaybeStartTrackingJobLocked_DeadlineReverseOrder_WithSkipping_SomeNotReady()
482 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testJobSkipToggling()
534 final long now = JobSchedulerService.sElapsedRealtimeClock.millis(); in testJobDelayWakeupAlarmToggling()
[all …]
/frameworks/base/services/core/java/com/android/server/job/
DJobPackageTracker.java67 mEventTimes[index] = sElapsedRealtimeClock.millis(); in addEvent()
136 mStartUptimeTime = sUptimeMillisClock.millis(); in DataSet()
137 mStartElapsedTime = sElapsedRealtimeClock.millis(); in DataSet()
138 mStartClockTime = sSystemClock.millis(); in DataSet()
454 final long now = sUptimeMillisClock.millis(); in notePending()
461 final long now = sUptimeMillisClock.millis(); in noteNonpending()
467 final long now = sUptimeMillisClock.millis(); in noteActive()
480 final long now = sUptimeMillisClock.millis(); in noteInactive()
509 final long now = sUptimeMillisClock.millis(); in getLoadFactor()
523 final long now = sUptimeMillisClock.millis(); in dump()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DUtilsTest.java137 long millis = 56789; in testToHMS() local
139 long time = (((hours * 60) + minutes) * 60) * 1000 + millis; in testToHMS()
152 long millis = 832077296000L; in testToUTCString() local
155 String result = Utils.toUTCString(millis); in testToUTCString()
/frameworks/base/services/core/java/com/android/server/notification/
DSystemConditionProviderService.java44 protected static String formatDuration(long millis) { in formatDuration() argument
46 TimeUtils.formatDuration(millis, sb); in formatDuration()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/
DUtils.java291 public static String toHMS(long millis) { in toHMS() argument
292 long time = millis >= 0 ? millis : -millis; in toHMS()
304 return String.format("%s%d:%02d:%02d.%03d", millis < 0 ? "-" : "", tmp, m, s, ms); in toHMS()
/frameworks/ex/common/java/com/android/common/
DOperationScheduler.java241 public void setTriggerTimeMillis(long millis) { in setTriggerTimeMillis() argument
243 mStorage.edit().putLong(PREFIX + "triggerTimeMillis", millis)); in setTriggerTimeMillis()
253 public void setMoratoriumTimeMillis(long millis) { in setMoratoriumTimeMillis() argument
255 .putLong(PREFIX + "moratoriumTimeMillis", millis) in setMoratoriumTimeMillis()

1234