Searched refs:time (Results 1 - 25 of 210) sorted by relevance

123456789

/packages/apps/Dialer/java/com/android/contacts/common/util/
H A DDateUtils.java28 * @param time Instance of time object to use for calculations.
33 public static int getDayDifference(Time time, long date1, long date2) { argument
34 time.set(date1);
35 int startDay = Time.getJulianDay(date1, time.gmtoff);
37 time.set(date2);
38 int currentDay = Time.getJulianDay(date2, time.gmtoff);
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
H A DCarApiUtilTest.java28 String time = "11:20";
29 int[] result = CarApiUtil.decodeGarageTimeSetting(time);
33 time = "23:59";
34 result = CarApiUtil.decodeGarageTimeSetting(time);
38 time = null;
40 CarApiUtil.decodeGarageTimeSetting(time));
42 time = "25:10";
43 result = CarApiUtil.decodeGarageTimeSetting(time);
46 time = "12:99";
47 result = CarApiUtil.decodeGarageTimeSetting(time);
[all...]
/packages/apps/Messaging/src/com/android/messaging/util/
H A DDates.java59 * Get the relative time as a string
61 * @param time The time
63 * @return The relative time
65 public static CharSequence getRelativeTimeSpanString(final long time) { argument
67 if (now - time < DateUtils.MINUTE_IN_MILLIS) {
75 // here and use a slightly less precise time.
77 return DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS,
80 return getShortRelativeTimeSpanString(time);
84 public static CharSequence getConversationTimeString(final long time) { argument
88 getMessageTimeString(final long time) argument
92 getWidgetTimeString(final long time, final boolean abbreviated) argument
96 getFastScrollPreviewTimeString(final long time) argument
100 getMessageDetailsTimeString(final long time) argument
113 getTimeString(final long time, final boolean abbreviated, final boolean minPeriodToday) argument
127 getTimestamp(final long time, final long now, final boolean abbreviated, final Locale locale, final int flags, final boolean minPeriodToday) argument
161 getTodayTimeStamp(final long time, final int flags) argument
166 getExplicitFormattedTime(final long time, final int flags, final String format24, final String format12) argument
177 getThisWeekTimestamp(final long time, final Locale locale, final boolean abbreviated, final int flags) argument
195 getThisYearTimestamp(final long time, final Locale locale, final boolean abbreviated, final int flags) argument
215 getOlderThanAYearTimestamp(final long time, final Locale locale, final boolean abbreviated, final int flags) argument
238 getShortRelativeTimeSpanString(final long time) argument
[all...]
/packages/apps/Camera2/src/com/android/camera/stats/profiler/
H A DProfileBase.java22 * Basic profiler that will compute start, end and "time since last event"
49 // In most cases this will only be used to reset the lastMark time.
54 long time = System.nanoTime();
55 onMark(getTotalMillis(time), getTimeFromLastMillis(time), reason);
56 mLastMark = time;
61 long time = System.nanoTime();
62 onStop(getTotalMillis(time), getTimeFromLastMillis(time));
63 mLastMark = time;
[all...]
/packages/inputmethods/LatinIME/native/jni/src/utils/
H A Dprofiler.h38 AKLOGI("Total time is %6.3f ms.", totalTime);
39 for (const auto &time : mTimes) {
40 AKLOGI("(%d): Used %4.2f%%, %8.4f ms. Called %d times.", time.first,
41 time.second / totalTime * 100.0f, time.second, mCounters[time.first]);
66 timespec time; local
67 clock_gettime(mClockId, &time);
68 return static_cast<int64_t>(time.tv_sec) * 1000000
69 + static_cast<int64_t>(time
[all...]
H A Dtime_keeper.cpp28 sCurrentTime = time(0);
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/util/
H A DMockClock.java20 /** Current time. Only updated with advance(). */
38 public void setCurrentTimeMillis(long time) { argument
39 mCurrentTimeMillis = time;
/packages/apps/DeskClock/src/com/android/deskclock/
H A DTimerTextController.java26 * A controller which will format a provided time in millis to display as a timer.
65 String time = Utils.getTimeString(mTextView.getContext(), hours, minutes, seconds);
67 time = "\u2212" + time;
70 mTextView.setText(time);
/packages/apps/Gallery2/src/com/android/gallery3d/app/
H A DControllerOverlay.java26 void onSeekMove(int time); argument
27 void onSeekEnd(int time, int trimStartTime, int trimEndTime); argument
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/
H A DGestureStrokeRecognitionPoints.java180 public void duplicateLastPointWith(final int time) { argument
187 x, y, time));
190 appendPoint(x, y, time);
191 updateIncrementalRecognitionSize(x, y, time);
206 private void appendPoint(final int x, final int y, final int time) { argument
209 // time than the next {@link MotionEvent}. To maintain the monotonicity of the event time,
211 if (lastIndex >= 0 && mEventTimes.get(lastIndex) > time) {
213 x, y, time, mXCoordinates.get(lastIndex), mYCoordinates.get(lastIndex),
217 mEventTimes.add(time);
222 updateMajorEvent(final int x, final int y, final int time) argument
232 detectFastMove(final int x, final int y, final int time) argument
272 addEventPoint(final int x, final int y, final int time, final boolean isMajorEvent) argument
292 updateIncrementalRecognitionSize(final int x, final int y, final int time) argument
[all...]
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/
H A DKeyEvents.java27 long time = SystemClock.uptimeMillis();
29 time,
30 time,
H A DTestTimer.java27 * A {@link Timer} for testing that can dial its clock hands to any future time.
39 public void fastForwardTo(long time) { argument
40 if (time < mNow) {
44 mNow = time;
85 public void schedule(TimerTask task, Date time) { argument
86 long executeTime = time.getTime();
/packages/services/Car/car-lib/src/android/car/
H A DCarApiUtil.java58 * time.
62 public static int[] decodeGarageTimeSetting(String time) { argument
64 if (time == null) {
68 String[] tokens = time.split(":");
/packages/apps/Contacts/src/com/android/contacts/util/concurrent/
H A DFuturesUtil.java25 public static <V> ListenableFuture<V> withTimeout(final ListenableFuture<V> future, long time, argument
27 return withTimeout(future, time, unit, ContactsExecutors.newHandlerExecutor(handler));
32 * time elapses before it finishes in which case the result will contain a TimeoutException and
38 public static <V> ListenableFuture<V> withTimeout(final ListenableFuture<V> future, long time, argument
47 }, time, unit);
/packages/apps/Nfc/nci/jni/
H A DIntervalTimer.h21 #include <time.h>
/packages/apps/Calendar/src/com/android/calendar/month/
H A DSimpleWeekView.java77 * How many days to display at a time. Days will be displayed starting with
118 // Cache the number strings so we don't have to recompute them each time
210 * @param tz The time zone this view should reference times in
247 Time time = new Time(tz);
248 time.setJulianDay(julianMonday);
253 mDayNumbers[0] = Integer.toString(time.getWeekNumber());
264 if (time.weekDay != mWeekStart) {
265 int diff = time.weekDay - mWeekStart;
269 time.monthDay -= diff;
270 time
[all...]
/packages/apps/Calendar/tests/src/com/android/calendar/widget/
H A DCalendarAppWidgetServiceTest.java80 // Set the "current time" to 2am tomorrow.
81 Time time = new Time();
82 time.setToNow();
83 time.monthDay += 1;
84 time.hour = 2;
85 time.minute = 0;
86 time.second = 0;
87 now = time.normalize(false);
148 // Set the start time to 5 days from now at midnight UTC.
149 Time time
[all...]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/common/
H A DInputPointersTests.java59 final int time = i * 4;
60 src.addPointer(x, y, pointerId, time);
67 final int time = i * 4;
71 assertEquals("times at " + i, time, src.getTimes()[i]);
82 final int time = i * 4;
83 src.addPointerAt(i, x, y, pointerId, time);
90 final int time = i * 4;
94 assertEquals("times at " + i, time, src.getTimes()[i]);
105 final int time = i * 4;
106 src.addPointer(x, y, pointerId, time);
[all...]
/packages/apps/Gallery2/src/com/android/gallery3d/anim/
H A DAnimation.java23 // Animation calculates a value according to the current input time.
27 // 2. Then we should call start(). The actual start time is the first value
29 // 3. Each time we want to get an animation value, we call
68 public void setStartTime(long time) { argument
69 mStartTime = time;
/packages/services/Car/tests/obd2_app/src/com/google/android/car/obd2app/
H A DStatusNotification.java21 import java.time.LocalDateTime;
22 import java.time.format.DateTimeFormatter;
/packages/apps/Dialer/java/com/android/incallui/answer/impl/classifier/
H A DHistoryEvaluator.java24 * Holds the evaluations for ended strokes and gestures. These values are decreased through time.
72 long time = SystemClock.elapsedRealtime();
74 if (time <= mLastUpdate) {
79 float factor = (float) Math.pow(HISTORY_FACTOR, (time - mLastUpdate) / INTERVAL);
83 mLastUpdate = time;
/packages/apps/Settings/src/com/android/settings/fuelgauge/
H A DBatteryFlagParser.java49 public void onDataPoint(long time, HistoryItem record) { argument
52 mData.put((int) time, isSet);
55 mLastTime = time;
/packages/apps/UnifiedEmail/src/com/android/mail/analytics/
H A DAnalyticsTimer.java25 * Generic static singleton timer that keeps track of start time of various events. It logs the
52 * Record the current time as the start time of the provided id. If the id has a previously
53 * recorded start time, that time is overwritten.
67 * start time.
84 * Same as logDuration except with the logged time returned (or exception thrown)
85 * @return logged time in millis
94 final long time = SystemClock.uptimeMillis() - value;
95 Analytics.getInstance().sendTiming(category, time, nam
[all...]
/packages/apps/TV/tests/unit/src/com/android/tv/data/
H A DWatchedHistoryManagerTest.java41 // Wait time for expected success.
72 long time = System.currentTimeMillis();
75 mWatchedHistoryManager.logChannelViewStop(channel, time, duration);
81 assertEquals(record.watchedStartTime, time - duration);
90 long time = System.currentTimeMillis();
96 mWatchedHistoryManager.logChannelViewStop(channel, time + duration * i, duration);
122 long time = System.currentTimeMillis();
124 WatchedRecord record = new WatchedRecord(fakeId, time, duration);
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/setting/
H A DGarageModeSettingsFragment.java97 int time[] = CarApiUtil.decodeGarageTimeSetting(
102 new Time(time[0], time[1], 0)));
103 mGarageTimeHour = time[0];
104 mGarageTimeMin = time[1];
125 dialog.show(getFragmentManager(), "time");
156 private void updateGarageTime(String time) { argument
158 KEY_GARAGE_MODE_WAKE_UP_TIME, time);

Completed in 4337 milliseconds

123456789