Home
last modified time | relevance | path

Searched refs:time (Results 1 – 25 of 334) sorted by relevance

12345678910>>...14

/packages/apps/Messaging/src/com/android/messaging/util/
DDates.java65 public static CharSequence getRelativeTimeSpanString(final long time) { in getRelativeTimeSpanString() argument
67 if (now - time < DateUtils.MINUTE_IN_MILLIS) { in getRelativeTimeSpanString()
77 return DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS, in getRelativeTimeSpanString()
80 return getShortRelativeTimeSpanString(time); in getRelativeTimeSpanString()
84 public static CharSequence getConversationTimeString(final long time) { in getConversationTimeString() argument
85 return getTimeString(time, true /*abbreviated*/, false /*minPeriodToday*/); in getConversationTimeString()
88 public static CharSequence getMessageTimeString(final long time) { in getMessageTimeString() argument
89 return getTimeString(time, false /*abbreviated*/, false /*minPeriodToday*/); in getMessageTimeString()
92 public static CharSequence getWidgetTimeString(final long time, final boolean abbreviated) { in getWidgetTimeString() argument
93 return getTimeString(time, abbreviated, true /*minPeriodToday*/); in getWidgetTimeString()
[all …]
/packages/apps/Calendar/src/com/android/calendar/month/
DSimpleWeekView.java247 Time time = new Time(tz); in setWeekParams() local
248 time.setJulianDay(julianMonday); in setWeekParams()
253 mDayNumbers[0] = Integer.toString(time.getWeekNumber()); in setWeekParams()
264 if (time.weekDay != mWeekStart) { in setWeekParams()
265 int diff = time.weekDay - mWeekStart; in setWeekParams()
269 time.monthDay -= diff; in setWeekParams()
270 time.normalize(true); in setWeekParams()
273 mFirstJulianDay = Time.getJulianDay(time.toMillis(true), time.gmtoff); in setWeekParams()
274 mFirstMonth = time.month; in setWeekParams()
287 if (time.monthDay == 1) { in setWeekParams()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/
DGestureStrokeRecognitionPoints.java180 public void duplicateLastPointWith(final int time) { in duplicateLastPointWith() argument
187 x, y, time)); in duplicateLastPointWith()
190 appendPoint(x, y, time); in duplicateLastPointWith()
191 updateIncrementalRecognitionSize(x, y, time); in duplicateLastPointWith()
206 private void appendPoint(final int x, final int y, final int time) { in appendPoint() argument
211 if (lastIndex >= 0 && mEventTimes.get(lastIndex) > time) { in appendPoint()
213 x, y, time, mXCoordinates.get(lastIndex), mYCoordinates.get(lastIndex), in appendPoint()
217 mEventTimes.add(time); in appendPoint()
222 private void updateMajorEvent(final int x, final int y, final int time) { in updateMajorEvent() argument
223 mLastMajorEventTime = time; in updateMajorEvent()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/util/
DTraceHelper.java46 MutableLong time = sUpTimes.get(sectionName); in beginSection() local
47 if (time == null) { in beginSection()
48 time = new MutableLong(isLoggable(sectionName, VERBOSE) ? 0 : -1); in beginSection()
49 sUpTimes.put(sectionName, time); in beginSection()
51 if (time.value >= 0) { in beginSection()
55 time.value = SystemClock.uptimeMillis(); in beginSection()
64 MutableLong time = sUpTimes.get(sectionName); in partitionSection() local
65 if (time != null && time.value >= 0) { in partitionSection()
73 Log.d(sectionName, partition + " : " + (now - time.value)); in partitionSection()
74 time.value = now; in partitionSection()
[all …]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/common/
DInputPointersTests.java73 final int time = i * 4; in testAdd() local
74 src.addPointer(x, y, pointerId, time); in testAdd()
81 final int time = i * 4; in testAdd() local
85 assertEquals("times at " + i, time, src.getTimes()[i]); in testAdd()
97 final int time = i * 4; in testAddAt() local
98 src.addPointerAt(i, x, y, pointerId, time); in testAddAt()
105 final int time = i * 4; in testAddAt() local
109 assertEquals("times at " + i, time, src.getTimes()[i]); in testAddAt()
121 final int time = i * 4; in testSet() local
122 src.addPointer(x, y, pointerId, time); in testSet()
[all …]
/packages/services/Car/tools/emulator/
Duser_action_generator.py16 import time
141 time.sleep(0.2)
150 time.sleep(1)
174 time.sleep(SHORT_SLEEP_TIME_SEC)
179 time.sleep(SHORT_SLEEP_TIME_SEC)
183 time.sleep(SHORT_SLEEP_TIME_SEC)
187 time.sleep(SHORT_SLEEP_TIME_SEC)
191 time.sleep(LONG_SLEEP_TIME_SEC)
194 time.sleep(LONG_SLEEP_TIME_SEC)
197 time.sleep(SHORT_SLEEP_TIME_SEC)
[all …]
/packages/apps/Camera2/src/com/android/camera/stats/profiler/
DProfileBase.java54 long time = System.nanoTime(); in mark() local
55 onMark(getTotalMillis(time), getTimeFromLastMillis(time), reason); in mark()
56 mLastMark = time; in mark()
61 long time = System.nanoTime(); in stop() local
62 onStop(getTotalMillis(time), getTimeFromLastMillis(time)); in stop()
63 mLastMark = time; in stop()
68 long time = System.nanoTime(); in stop() local
69 onStop(getTotalMillis(time), getTimeFromLastMillis(time), reason); in stop()
70 mLastMark = time; in stop()
/packages/apps/Calendar/tests/src/com/android/calendar/widget/
DCalendarAppWidgetServiceTest.java82 Time time = new Time(); in setUp() local
83 time.setToNow(); in setUp()
84 time.monthDay += 1; in setUp()
85 time.hour = 2; in setUp()
86 time.minute = 0; in setUp()
87 time.second = 0; in setUp()
88 now = time.normalize(false); in setUp()
150 Time time = new Time(); in testGetAppWidgetModel_AllDayEventLater() local
151 time.set(now); in testGetAppWidgetModel_AllDayEventLater()
152 time.monthDay += 5; in testGetAppWidgetModel_AllDayEventLater()
[all …]
/packages/apps/Calendar/src/com/android/calendar/widget/
DCalendarAppWidgetService.java441 Time time = new Time();
442 time.setToNow();
443 time.monthDay++;
444 time.hour = 0;
445 time.minute = 0;
446 time.second = 0;
447 long midnightDeviceTz = time.normalize(true);
449 time.timezone = timezone;
450 time.setToNow();
451 time.monthDay++;
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/tools/
DSaveImage.java318 private void updateExifData(ExifInterface exif, long time) { in updateExifData() argument
320 exif.addDateTimeStampTag(ExifInterface.TAG_DATE_TIME, time, in updateExifData()
358 long time = System.currentTimeMillis(); in processAndSaveImage() local
359 updateExifData(exif, time); in processAndSaveImage()
362 … ContentValues values = getContentValues(mContext, mSelectedImageUri, mDestinationFile, time); in processAndSaveImage()
370 long time = System.currentTimeMillis(); in processAndSaveImage() local
371 updateExifData(exif, time); in processAndSaveImage()
383 mDestinationFile, time, !flatten); in processAndSaveImage()
420 long time = System.currentTimeMillis(); in processAndSaveImage() local
423 updateExifData(exif, time); in processAndSaveImage()
[all …]
/packages/inputmethods/LatinIME/native/jni/src/utils/
Dprofiler.h39 for (const auto &time : mTimes) { in ~Profiler() local
40 AKLOGI("(%d): Used %4.2f%%, %8.4f ms. Called %d times.", time.first, in ~Profiler()
41 time.second / totalTime * 100.0f, time.second, mCounters[time.first]); in ~Profiler()
66 timespec time; in getTimeInMicroSec() local
67 clock_gettime(mClockId, &time); in getTimeInMicroSec()
68 return static_cast<int64_t>(time.tv_sec) * 1000000 in getTimeInMicroSec()
69 + static_cast<int64_t>(time.tv_nsec) / 1000; in getTimeInMicroSec()
/packages/services/Car/tests/BugReportApp/utils/
Dbugreport_app_tester.py51 import time
322 timeout_at = time.time() + deadline_sec
323 last_fetch_at = time.time()
324 while time.time() < timeout_at:
325 remaining = timeout_at - time.time()
328 time.sleep(BUGREPORT_STATUS_POLL_TICK)
329 if time.time() - last_fetch_at < CHECK_STATUS_EVERY_SEC:
331 last_fetch_at = time.time()
551 time.sleep(META_BUGREPORT_WAIT_TIME_SEC)
/packages/apps/QuickSearchBox/benchmarks/src/com/android/quicksearchbox/benchmarks/
DSourceLatency.java74 public synchronized void addTime(long time) { in addTime() argument
75 mTotal += time; in addTime()
91 final ElapsedTime time = new ElapsedTime(); in checkSourceConcurrent() local
100 time.addTime(t); in checkSourceConcurrent()
111 while (time.getCount() < count) { in checkSourceConcurrent()
118 Log.d(TAG, src + "[DONE]: " + length + " queries in " + formatTime(time.getAverage()) in checkSourceConcurrent()
119 + " (average), " + formatTime(time.getTotal()) + " (total)"); in checkSourceConcurrent()
123 ElapsedTime time = new ElapsedTime(); in checkSource() local
127 time.addTime(t); in checkSource()
129 Log.d(TAG, src + "[DONE]: " + count + " queries in " + formatTime(time.getAverage()) in checkSource()
[all …]
/packages/apps/TV/src/com/android/tv/data/
DProgramDataManager.java174 Clock time, in ProgramDataManager() argument
182 mClock = time; in ProgramDataManager()
425 private int getProgramIndexAt(List<Program> programs, long time) { in getProgramIndexAt() argument
426 Program key = mZeroLengthProgramCache.get(time); in getProgramIndexAt()
428 key = createStubProgram(time, time); in getProgramIndexAt()
429 mZeroLengthProgramCache.put(time, key); in getProgramIndexAt()
434 if (index > 0 && isProgramPlayedAt(programs.get(index - 1), time)) { in getProgramIndexAt()
443 private boolean isProgramPlayedAt(Program program, long time) { in isProgramPlayedAt() argument
444 return program.getStartTimeUtcMillis() <= time && time <= program.getEndTimeUtcMillis(); in isProgramPlayedAt()
580 long time = mClock.currentTimeMillis(); in ProgramsPrefetchTask() local
[all …]
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/
DCalendarProvider2Test.java132 Time time = new Time(timeZone); in parseTimeStringToMillis() local
133 time.parse3339(timeStr); in parseTimeStringToMillis()
134 return time.toMillis(false /* use isDst */); in parseTimeStringToMillis()
343 Time time = new Time(DEFAULT_TIMEZONE); in DumpInstances() local
344 time.parse3339(startDate); in DumpInstances()
345 begin = time.toMillis(false /* use isDst */); in DumpInstances()
346 time.parse3339(endDate); in DumpInstances()
347 end = time.toMillis(false /* use isDst */); in DumpInstances()
367 Time time = new Time(DEFAULT_TIMEZONE); in QueryNumInstances() local
368 time.parse3339(startDate); in QueryNumInstances()
[all …]
/packages/apps/TV/tests/unit/src/com/android/tv/recommendation/
DRoutineWatchEvaluatorTest.java142 Calendar time = Calendar.getInstance(); in testProgramTime_createFromProgram() local
143 int todayDayOfWeek = time.get(Calendar.DAY_OF_WEEK); in testProgramTime_createFromProgram()
312 Calendar time = Calendar.getInstance(); in todayAtHourMinSec() local
313 time.set(Calendar.HOUR_OF_DAY, hour); in todayAtHourMinSec()
314 time.set(Calendar.MINUTE, minute); in todayAtHourMinSec()
315 time.set(Calendar.SECOND, second); in todayAtHourMinSec()
316 return time; in todayAtHourMinSec()
320 Calendar time = todayAtHourMin(hour, minute); in tomorrowAtHourMin() local
321 time.add(Calendar.DATE, 1); in tomorrowAtHourMin()
322 return time; in tomorrowAtHourMin()
/packages/apps/TV/src/com/android/tv/recommendation/
DRoutineWatchEvaluator.java207 static int getTimeOfDayInSec(Calendar time) { in getTimeOfDayInSec() argument
208 return time.get(Calendar.HOUR_OF_DAY) * 60 * 60 in getTimeOfDayInSec()
209 + time.get(Calendar.MINUTE) * 60 in getTimeOfDayInSec()
210 + time.get(Calendar.SECOND); in getTimeOfDayInSec()
238 Calendar time = Calendar.getInstance(); in createFromProgram() local
240 time.setTimeInMillis(p.getStartTimeUtcMillis()); in createFromProgram()
241 int weekDay = time.get(Calendar.DAY_OF_WEEK); in createFromProgram()
242 int startTimeOfDayInSec = getTimeOfDayInSec(time); in createFromProgram()
244 time.setTimeInMillis(p.getEndTimeUtcMillis()); in createFromProgram()
245 boolean dayChanged = (weekDay != time.get(Calendar.DAY_OF_WEEK)); in createFromProgram()
/packages/providers/CalendarProvider/src/com/android/providers/calendar/
DCalendarAlarmManager.java254 Time time = new Time(); in scheduleNextAlarmLocked() local
263 time.set(start); in scheduleNextAlarmLocked()
264 String startTimeStr = time.format(" %a, %b %d, %Y %I:%M%P"); in scheduleNextAlarmLocked()
309 time.setToNow(); in scheduleNextAlarmLocked()
310 time.normalize(false); in scheduleNextAlarmLocked()
311 long localOffset = time.gmtoff * 1000; in scheduleNextAlarmLocked()
375 time.set(nextAlarmTime); in scheduleNextAlarmLocked()
376 String alarmTimeStr = time.format(" %a, %b %d, %Y %I:%M%P"); in scheduleNextAlarmLocked()
396 time.set(alarmTime); in scheduleNextAlarmLocked()
397 String schedTime = time.format(" %a, %b %d, %Y %I:%M%P"); in scheduleNextAlarmLocked()
[all …]
/packages/services/Car/tests/carservice_test/src/com/android/car/
DCarDiagnosticManagerTest.java291 long time = SystemClock.elapsedRealtimeNanos(); in testLiveFrameEvent() local
295 getMockedVehicleHal().injectEvent(mLiveFrameEventBuilder.build(time)); in testLiveFrameEvent()
296 assertTrue(listener.waitForEvent(time)); in testLiveFrameEvent()
580 long time = SystemClock.elapsedRealtimeNanos(); in testMultipleListeners() local
581 getMockedVehicleHal().injectEvent(mLiveFrameEventBuilder.build(time)); in testMultipleListeners()
582 assertTrue(listener1.waitForEvent(time)); in testMultipleListeners()
583 assertTrue(listener2.waitForEvent(time)); in testMultipleListeners()
610 time += 1000; in testMultipleListeners()
611 getMockedVehicleHal().injectEvent(mLiveFrameEventBuilder.build(time)); in testMultipleListeners()
612 assertFalse(listener1.waitForEvent(time)); in testMultipleListeners()
[all …]
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/
DMotionPauseDetector.java108 public void addPosition(float position, long time) { in addPosition() argument
116 long changeInTime = Math.max(1, time - mPreviousTime); in addPosition()
120 checkMotionPaused(velocity, mPreviousVelocity, time); in addPosition()
124 mPreviousTime = time; in addPosition()
128 private void checkMotionPaused(float velocity, float prevVelocity, long time) { in checkMotionPaused() argument
151 mSlowStartTime = time; in checkMotionPaused()
153 isPaused = time - mSlowStartTime >= HARDER_TRIGGER_TIMEOUT; in checkMotionPaused()
/packages/apps/TV/tests/robotests/src/com/android/tv/data/
DWatchedHistoryManagerTest.java74 long time = System.currentTimeMillis(); in testLogChannelViewStop() local
77 mWatchedHistoryManager.logChannelViewStop(channel, time, duration); in testLogChannelViewStop()
83 assertThat(time - duration).isEqualTo(record.watchedStartTime); in testLogChannelViewStop()
92 long time = System.currentTimeMillis(); in testCircularHistoryQueue() local
98 mWatchedHistoryManager.logChannelViewStop(channel, time + duration * i, duration); in testCircularHistoryQueue()
124 long time = System.currentTimeMillis(); in testEncodeDecodeWatchedRecord() local
126 WatchedRecord record = new WatchedRecord(fakeId, time, duration); in testEncodeDecodeWatchedRecord()
/packages/apps/Calendar/src/com/android/calendar/
DCalendarViewAdapter.java111 Time time = new Time(mTimeZone); in refresh() local
113 time.set(now); in refresh()
114 mTodayJulianDay = Time.getJulianDay(now, time.gmtoff); in refresh()
125 Time time = new Time(mTimeZone); in setMidnightHandler() local
126 time.set(now); in setMidnightHandler()
127 long runInMillis = (24 * 3600 - time.hour * 3600 - time.minute * 60 - in setMidnightHandler()
128 time.second + 1) * 1000; in setMidnightHandler()
291 public void setTime(long time) { in setTime() argument
292 mMilliTime = time; in setTime()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryInfo.java80 public void onDataPoint(long time, HistoryItem record) { in bindHistory()
81 lastTime = (int) time; in bindHistory()
302 void onDataPoint(long time, HistoryItem record); in onDataPoint() argument
326 historyStart = rec.time; in parse()
339 || rec.time < (historyStart + (5 * 60 * 1000L))) { in parse()
343 lastRealtime = rec.time; in parse()
350 historyEnd = rec.time; in parse()
367 curWalltime += rec.time - lastRealtime; in parse()
368 lastRealtime = rec.time; in parse()
383 curWalltime = startWalltime + (rec.time - historyStart); in parse()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/
DBatteryInfo.java78 public void onDataPoint(long time, HistoryItem record) { in bindHistory()
79 lastTime = (int) time; in bindHistory()
299 void onDataPoint(long time, HistoryItem record); in onDataPoint() argument
323 historyStart = rec.time; in parse()
336 || rec.time < (historyStart + (5 * 60 * 1000L))) { in parse()
340 lastRealtime = rec.time; in parse()
347 historyEnd = rec.time; in parse()
364 curWalltime += rec.time - lastRealtime; in parse()
365 lastRealtime = rec.time; in parse()
380 curWalltime = startWalltime + (rec.time - historyStart); in parse()
[all …]
/packages/apps/Dialer/java/com/android/contacts/common/util/
DDateUtils.java33 public static int getDayDifference(Time time, long date1, long date2) { in getDayDifference() argument
34 time.set(date1); in getDayDifference()
35 int startDay = Time.getJulianDay(date1, time.gmtoff); in getDayDifference()
37 time.set(date2); in getDayDifference()
38 int currentDay = Time.getJulianDay(date2, time.gmtoff); in getDayDifference()

12345678910>>...14