Home
last modified time | relevance | path

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

12

/frameworks/base/core/java/android/text/format/
DDateUtils.java358 public static CharSequence formatDuration(long millis) { in formatDuration() argument
360 if (millis >= HOUR_IN_MILLIS) { in formatDuration()
361 final int hours = (int) ((millis + 1800000) / HOUR_IN_MILLIS); in formatDuration()
364 } else if (millis >= MINUTE_IN_MILLIS) { in formatDuration()
365 final int minutes = (int) ((millis + 30000) / MINUTE_IN_MILLIS); in formatDuration()
369 final int seconds = (int) ((millis + 500) / SECOND_IN_MILLIS); in formatDuration()
752 public static String formatDateTime(Context context, long millis, int flags) { in formatDateTime() argument
753 return formatDateRange(context, millis, millis, flags); in formatDateTime()
770 public static CharSequence getRelativeTimeSpanString(Context c, long millis, in getRelativeTimeSpanString() argument
775 long span = Math.abs(now - millis); in getRelativeTimeSpanString()
[all …]
DTime.java763 public void set(long millis) { in set() argument
766 calculator.setTimeInMillis(millis); in set()
952 long millis = time.toMillis(true); in isEpoch() local
953 return getJulianDay(millis, 0) == EPOCH_JULIAN_DAY; in isEpoch()
974 public static int getJulianDay(long millis, long gmtoff) { in getJulianDay() argument
976 long julianDay = (millis + offsetMillis) / DateUtils.DAY_IN_MILLIS; in getJulianDay()
1004 long millis = (julianDay - EPOCH_JULIAN_DAY) * DateUtils.DAY_IN_MILLIS; in setJulianDay() local
1005 set(millis); in setJulianDay()
1009 int approximateDay = getJulianDay(millis, gmtoff); in setJulianDay()
1017 millis = normalize(true); in setJulianDay()
[all …]
DFormatter.java201 public static String formatShortElapsedTime(Context context, long millis) { in formatShortElapsedTime() argument
202 long secondsLong = millis / 1000; in formatShortElapsedTime()
262 public static String formatShortElapsedTimeRoundingUpToMinutes(Context context, long millis) { in formatShortElapsedTimeRoundingUpToMinutes() argument
263 long minutesRoundedUp = (millis + MILLIS_PER_MINUTE - 1) / MILLIS_PER_MINUTE; in formatShortElapsedTimeRoundingUpToMinutes()
/frameworks/base/location/java/android/location/
DLocationRequest.java312 public LocationRequest setInterval(long millis) { in setInterval() argument
313 checkInterval(millis); in setInterval()
314 mInterval = millis; in setInterval()
359 public LocationRequest setFastestInterval(long millis) { in setFastestInterval() argument
360 checkInterval(millis); in setFastestInterval()
362 mFastestInterval = millis; in setFastestInterval()
395 public LocationRequest setExpireIn(long millis) { in setExpireIn() argument
399 if (millis > Long.MAX_VALUE - elapsedRealtime) { in setExpireIn()
402 mExpireAt = millis + elapsedRealtime; in setExpireIn()
423 public LocationRequest setExpireAt(long millis) { in setExpireAt() argument
[all …]
/frameworks/base/core/java/android/os/
DDropBoxManager.java100 public Entry(String tag, long millis) { in Entry() argument
104 mTimeMillis = millis; in Entry()
111 public Entry(String tag, long millis, String text) { in Entry() argument
116 mTimeMillis = millis; in Entry()
126 public Entry(String tag, long millis, byte[] data, int flags) { in Entry() argument
133 mTimeMillis = millis; in Entry()
143 public Entry(String tag, long millis, ParcelFileDescriptor data, int flags) { in Entry() argument
150 mTimeMillis = millis; in Entry()
160 public Entry(String tag, long millis, File data, int flags) throws IOException { in Entry() argument
165 mTimeMillis = millis; in Entry()
[all …]
DSystemClock.java142 public static boolean setCurrentTimeMillis(long millis) { in setCurrentTimeMillis() argument
150 return mgr.setTime(millis); in setCurrentTimeMillis()
/frameworks/base/core/java/android/util/
DTimeUtils.java342 int millis = (int)(duration%1000); in formatDurationLocked() local
366 myLen += accumField(millis, 2, true, myLen > 0 ? 3 : 0) + 1; in formatDurationLocked()
383 … pos = printFieldLocked(formatStr, millis, 'm', pos, true, (zeropad && pos != start) ? 3 : 0); in formatDurationLocked()
438 public static String logTimeOfDay(long millis) { in logTimeOfDay() argument
440 if (millis >= 0) { in logTimeOfDay()
441 c.setTimeInMillis(millis); in logTimeOfDay()
444 return Long.toString(millis); in logTimeOfDay()
449 public static String formatForLogging(long millis) { in formatForLogging() argument
450 if (millis <= 0) { in formatForLogging()
453 return sLoggingFormat.format(new Date(millis)); in formatForLogging()
/frameworks/base/core/tests/coretests/src/android/text/format/
DTimeTest.java206 long millis = local.toMillis(true /* ignore isDst */); in testNormalize1() local
207 local.set(millis); in testNormalize1()
251 long millis = local.toMillis(false /* use isDst */); in testNormalize1() local
252 local.set(millis); in testNormalize1()
537 long millis = time.normalize(true); in disableTestGetJulianDay() local
543 int julianDay = Time.getJulianDay(millis, time.gmtoff); in disableTestGetJulianDay()
550 millis = time.normalize(true); in disableTestGetJulianDay()
551 int day = Time.getJulianDay(millis, time.gmtoff); in disableTestGetJulianDay()
578 long millis = time.normalize(true); in disableTestSetJulianDay() local
582 int julianDay = Time.getJulianDay(millis, time.gmtoff); in disableTestSetJulianDay()
[all …]
/frameworks/base/services/core/java/com/android/server/
DVibratorService.java106 Vibration(IBinder token, long millis, int usageHint, int uid, String opPkg) { in Vibration() argument
107 this(token, millis, null, 0, usageHint, uid, opPkg); in Vibration()
115 private Vibration(IBinder token, long millis, long[] pattern, in Vibration() argument
118 mTimeout = millis; in Vibration()
137 public boolean hasLongerTimeout(long millis) { in hasLongerTimeout() argument
144 < (SystemClock.uptimeMillis() + millis)) { in hasLongerTimeout()
611 private void doVibratorOn(long millis, int uid, int usageHint) { in doVibratorOn() argument
614 Slog.d(TAG, "Turning vibrator on for " + millis + " ms."); in doVibratorOn()
617 mBatteryStatsService.noteVibratorOn(uid, millis); in doVibratorOn()
626 mInputDeviceVibrators.get(i).vibrate(millis, attributes); in doVibratorOn()
[all …]
DDropBoxManagerService.java138 public DropBoxManager.Entry getNextEntry(String tag, long millis) {
139 return DropBoxManagerService.this.getNextEntry(tag, millis);
318 public synchronized DropBoxManager.Entry getNextEntry(String tag, long millis) { in getNextEntry() argument
334 for (EntryFile entry : list.contents.tailSet(new EntryFile(millis + 1))) { in getNextEntry()
609 long millis; in EntryFile() local
610 try { millis = Long.valueOf(name); } catch (NumberFormatException e) { millis = 0; } in EntryFile()
611 this.timestampMillis = millis; in EntryFile()
618 public EntryFile(long millis) { in EntryFile() argument
620 this.timestampMillis = millis; in EntryFile()
/frameworks/base/packages/Osu/src/com/android/hotspot2/
DUtils.java246 public static String toHMS(long millis) { in toHMS() argument
247 long time = millis >= 0 ? millis : -millis; in toHMS()
259 return String.format("%s%d:%02d:%02d.%03d", millis < 0 ? "-" : "", tmp, m, s, ms); in toHMS()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/
DUtils.java246 public static String toHMS(long millis) { in toHMS() argument
247 long time = millis >= 0 ? millis : -millis; in toHMS()
259 return String.format("%s%d:%02d:%02d.%03d", millis < 0 ? "-" : "", tmp, m, s, ms); in toHMS()
/frameworks/opt/datetimepicker/src/com/android/datetimepicker/date/
DDatePickerDialog.java288 long millis = mCalendar.getTimeInMillis(); in setCurrentView() local
308 String dayString = DateUtils.formatDateTime(getActivity(), millis, flags); in setCurrentView()
327 CharSequence yearString = YEAR_FORMAT.format(millis); in setCurrentView()
346 long millis = mCalendar.getTimeInMillis(); in updateDisplay() local
347 mAnimator.setDateMillis(millis); in updateDisplay()
349 String monthAndDayText = DateUtils.formatDateTime(getActivity(), millis, flags); in updateDisplay()
354 String fullDateText = DateUtils.formatDateTime(getActivity(), millis, flags); in updateDisplay()
/frameworks/support/v4/java/android/support/v4/util/
DTimeUtils.java100 int millis = (int)(duration%1000); in formatDurationLocked() local
124 myLen += accumField(millis, 2, true, myLen > 0 ? 3 : 0) + 1; in formatDurationLocked()
141 pos = printField(formatStr, millis, 'm', pos, true, (zeropad && pos != start) ? 3 : 0); in formatDurationLocked()
/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()
DScheduleCalendar.java69 private long getTime(long millis, int hour, int min) { in getTime() argument
70 mCalendar.setTimeInMillis(millis); in getTime()
/frameworks/ex/common/java/com/android/common/
DOperationScheduler.java244 public void setTriggerTimeMillis(long millis) { in setTriggerTimeMillis() argument
246 mStorage.edit().putLong(PREFIX + "triggerTimeMillis", millis)); in setTriggerTimeMillis()
256 public void setMoratoriumTimeMillis(long millis) { in setMoratoriumTimeMillis() argument
258 .putLong(PREFIX + "moratoriumTimeMillis", millis) in setMoratoriumTimeMillis()
/frameworks/base/services/core/jni/
Dcom_android_server_AlarmManagerService.cpp244 … android_server_AlarmManagerService_setKernelTime(JNIEnv*, jobject, jlong nativeData, jlong millis) in android_server_AlarmManagerService_setKernelTime() argument
250 if (millis <= 0 || millis / 1000LL >= INT_MAX) { in android_server_AlarmManagerService_setKernelTime()
254 tv.tv_sec = (time_t) (millis / 1000LL); in android_server_AlarmManagerService_setKernelTime()
255 tv.tv_usec = (suseconds_t) ((millis % 1000LL) * 1000LL); in android_server_AlarmManagerService_setKernelTime()
/frameworks/base/tests/ImfTest/tests/src/com/android/imftest/samples/
DImfBaseTestCase.java142 void pause(int millis) { in pause() argument
144 Thread.sleep(millis); in pause()
/frameworks/base/libs/usb/tests/accessorytest/
Dhid.c41 static void milli_sleep(int millis) { in milli_sleep() argument
45 tm.tv_nsec = millis * 1000000; in milli_sleep()
Dusb.c37 static void milli_sleep(int millis) { in milli_sleep() argument
41 tm.tv_nsec = millis * 1000000; in milli_sleep()
/frameworks/base/libs/usb/tests/AccessoryChat/accessorychat/
Daccessorychat.c69 static void milli_sleep(int millis) { in milli_sleep() argument
73 tm.tv_nsec = millis * 1000000; in milli_sleep()
/frameworks/base/core/java/com/android/internal/os/
DIDropBoxManagerService.aidl41 DropBoxManager.Entry getNextEntry(String tag, long millis); in getNextEntry() argument
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DUtil.java145 public static String getShortTime(long millis) { in getShortTime() argument
146 return HMMAA.format(new Date(millis)); in getShortTime()
/frameworks/opt/timezonepicker/src/com/android/timezonepicker/
DTimeZonePickerUtils.java65 public CharSequence getGmtDisplayName(Context context, String id, long millis, in getGmtDisplayName() argument
79 return buildGmtDisplayName(timezone, millis, grayGmt); in getGmtDisplayName()

12