/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/ |
D | DataUsageSummaryPreferenceControllerTest.java | 148 final long now = System.currentTimeMillis(); in testSummaryUpdate_onePlan_basic() local 149 final DataUsageController.DataUsageInfo info = createTestDataUsageInfo(now); in testSummaryUpdate_onePlan_basic() 155 mController.setCarrierValues(CARRIER_NAME, now - UPDATE_BACKOFF_MS, info.cycleEnd, intent); in testSummaryUpdate_onePlan_basic() 164 verify(mSummaryPreference).setUsageInfo(info.cycleEnd, now - UPDATE_BACKOFF_MS, in testSummaryUpdate_onePlan_basic() 173 final long now = System.currentTimeMillis(); in testSummaryUpdate_noPlan_basic() local 174 final DataUsageController.DataUsageInfo info = createTestDataUsageInfo(now); in testSummaryUpdate_noPlan_basic() 180 mController.setCarrierValues(CARRIER_NAME, now - UPDATE_BACKOFF_MS, info.cycleEnd, intent); in testSummaryUpdate_noPlan_basic() 189 verify(mSummaryPreference).setUsageInfo(info.cycleEnd, now - UPDATE_BACKOFF_MS, in testSummaryUpdate_noPlan_basic() 198 final long now = System.currentTimeMillis(); in testSummaryUpdate_noCarrier_basic() local 199 final DataUsageController.DataUsageInfo info = createTestDataUsageInfo(now); in testSummaryUpdate_noCarrier_basic() [all …]
|
/packages/apps/DeskClock/tests/src/com/android/deskclock/uidata/ |
D | PeriodicCallbackModelTest.java | 93 final long now = c.getTimeInMillis(); in getMidnightDelay() local 95 assertEquals(1, PeriodicCallbackModel.getDelay(now - 3001, MIDNIGHT, -3000)); in getMidnightDelay() 96 assertEquals(86400000, PeriodicCallbackModel.getDelay(now - 3000, MIDNIGHT, -3000)); in getMidnightDelay() 97 assertEquals(86399999, PeriodicCallbackModel.getDelay(now - 2999, MIDNIGHT, -3000)); in getMidnightDelay() 99 assertEquals(1, PeriodicCallbackModel.getDelay(now - 1, MIDNIGHT, 0)); in getMidnightDelay() 100 assertEquals(86400000, PeriodicCallbackModel.getDelay(now, MIDNIGHT, 0)); in getMidnightDelay() 101 assertEquals(86399999, PeriodicCallbackModel.getDelay(now + 1, MIDNIGHT, 0)); in getMidnightDelay() 103 assertEquals(3001, PeriodicCallbackModel.getDelay(now - 1, MIDNIGHT, 3000)); in getMidnightDelay() 104 assertEquals(3000, PeriodicCallbackModel.getDelay(now, MIDNIGHT, 3000)); in getMidnightDelay() 105 assertEquals(1, PeriodicCallbackModel.getDelay(now + 2999, MIDNIGHT, 3000)); in getMidnightDelay() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/widget/ |
D | DotsPageIndicator.java | 557 private void setSelectedPage(int now) { in setSelectedPage() argument 558 if (now == currentPage || pageCount == 0) { in setSelectedPage() 563 currentPage = now; in setSelectedPage() 573 final int steps = Math.abs(now - was); in setSelectedPage() 574 moveAnimation = createMoveSelectedAnimator(dotCenterX[now], was, now, steps); in setSelectedPage() 581 joiningAnimations[i] = createJoiningAnimator(now > was ? was + i : was - 1 - i, in setSelectedPage() 592 private ValueAnimator createMoveSelectedAnimator(final float moveTo, int was, int now, in createMoveSelectedAnimator() argument 598 retreatAnimation = new PendingRetreatAnimator(was, now, steps, in createMoveSelectedAnimator() 599 now > was in createMoveSelectedAnimator() 759 public PendingRetreatAnimator(int was, int now, int steps, StartPredicate predicate) { in PendingRetreatAnimator() argument [all …]
|
/packages/apps/Settings/src/com/android/settings/widget/ |
D | DotsPageIndicator.java | 557 private void setSelectedPage(int now) { in setSelectedPage() argument 558 if (now == currentPage || pageCount == 0) { in setSelectedPage() 563 currentPage = now; in setSelectedPage() 573 final int steps = Math.abs(now - was); in setSelectedPage() 574 moveAnimation = createMoveSelectedAnimator(dotCenterX[now], was, now, steps); in setSelectedPage() 581 joiningAnimations[i] = createJoiningAnimator(now > was ? was + i : was - 1 - i, in setSelectedPage() 592 private ValueAnimator createMoveSelectedAnimator(final float moveTo, int was, int now, in createMoveSelectedAnimator() argument 598 retreatAnimation = new PendingRetreatAnimator(was, now, steps, in createMoveSelectedAnimator() 599 now > was in createMoveSelectedAnimator() 759 public PendingRetreatAnimator(int was, int now, int steps, StartPredicate predicate) { in PendingRetreatAnimator() argument [all …]
|
/packages/apps/Calendar/tests/src/com/android/calendar/widget/ |
D | CalendarAppWidgetServiceTest.java | 44 long now; field in CalendarAppWidgetServiceTest 88 now = time.normalize(false); in setUp() 107 cursor.addRow(getRow(0, now + ONE_HOUR, now + TWO_HOURS, title, location, 0)); in testGetAppWidgetModel_1Event() 114 eventInfo.when = Utils.formatDateRange(getContext(), now + ONE_HOUR, now + TWO_HOURS, in testGetAppWidgetModel_1Event() 141 eventInfo.when = Utils.formatDateRange(context, now + ONE_HOUR, now + TWO_HOURS, in testGetAppWidgetModel_AllDayEventLater() 146 cursor.addRow(getRow(0, now + ONE_HOUR, now + TWO_HOURS, title + i, location + i, 0)); in testGetAppWidgetModel_AllDayEventLater() 151 time.set(now); in testGetAppWidgetModel_AllDayEventLater()
|
/packages/apps/Calendar/src/com/android/calendar/widget/ |
D | CalendarAppWidgetService.java | 250 final long now = System.currentTimeMillis(); 251 if (!eventInfo.allDay && eventInfo.start <= now && now <= eventInfo.end) { 401 long now = System.currentTimeMillis(); 403 long begin = now - DateUtils.DAY_IN_MILLIS; 404 long end = now + SEARCH_DURATION + DateUtils.DAY_IN_MILLIS; 421 private long calculateUpdateTime(CalendarAppWidgetModel model, long now, String timeZone) { 431 if (now < start) { 433 } else if (now < end) { 490 final long now = System.currentTimeMillis(); 511 long triggerTime = calculateUpdateTime(mModel, now, tz); [all …]
|
/packages/modules/NetworkStack/src/android/net/ip/ |
D | IpClientLinkObserver.java | 355 private synchronized void updatePref64(IpPrefix prefix, final long now, in updatePref64() argument 362 if (expiry > now) { in updatePref64() 374 if (mNat64PrefixExpiry > now) return; in updatePref64() 377 if (expiry > now) { in updatePref64() 390 private void processPref64Option(StructNdOptPref64 opt, final long now) { in processPref64Option() argument 391 final long expiry = now + TimeUnit.SECONDS.toMillis(opt.lifetime); in processPref64Option() 392 updatePref64(opt.prefix, now, expiry); in processPref64Option() 504 long now = System.currentTimeMillis(); in addServers() local 505 long expiry = now + 1000 * lifetime; in addServers() 520 if (expiry > now) { in addServers() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
D | Dates.java | 66 final long now = System.currentTimeMillis(); in getRelativeTimeSpanString() local 67 if (now - time < DateUtils.MINUTE_IN_MILLIS) { in getRelativeTimeSpanString() 77 return DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS, in getRelativeTimeSpanString() 127 public static CharSequence getTimestamp(final long time, final long now, in getTimestamp() argument 130 final long timeDiff = now - time; in getTimestamp() 136 } else if (getNumberOfDaysPassed(time, now) == 0) { in getTimestamp() 239 final long now = System.currentTimeMillis(); in getShortRelativeTimeSpanString() local 240 final long duration = Math.abs(now - time); in getShortRelativeTimeSpanString() 254 count = getNumberOfDaysPassed(time, now); in getShortRelativeTimeSpanString()
|
/packages/modules/DnsResolver/ |
D | DnsTlsDispatcher.cpp | 191 auto now = std::chrono::steady_clock::now(); in query() local 195 xport->lastUsed = now; in query() 196 cleanup(now); in query() 203 void DnsTlsDispatcher::cleanup(std::chrono::time_point<std::chrono::steady_clock> now) { in cleanup() argument 206 if (now - mLastCleanup < IDLE_TIMEOUT) { in cleanup() 211 if (s->useCount == 0 && now - s->lastUsed > IDLE_TIMEOUT) { in cleanup() 217 mLastCleanup = now; in cleanup()
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
D | GLRootView.java | 161 long now = SystemClock.uptimeMillis(); in setContentPane() local 163 now, now, MotionEvent.ACTION_CANCEL, 0, 0, 0); in setContentPane() 328 long now = System.nanoTime(); in outputFps() local 330 mFrameCountingStart = now; in outputFps() 331 } else if ((now - mFrameCountingStart) > 1000000000) { in outputFps() 333 * 1000000000 / (now - mFrameCountingStart)); in outputFps() 334 mFrameCountingStart = now; in outputFps() 419 long now = AnimationTime.get(); in onDrawFrameLocked() local 421 mAnimations.get(i).setStartTime(now); in onDrawFrameLocked()
|
D | ProgressSpinner.java | 60 long now = AnimationTime.get(); in draw() local 61 if (mAnimationTimestamp == -1) mAnimationTimestamp = now; in draw() 62 mOuterDegree += (now - mAnimationTimestamp) * ROTATE_SPEED_OUTER; in draw() 63 mInnerDegree += (now - mAnimationTimestamp) * ROTATE_SPEED_INNER; in draw() 65 mAnimationTimestamp = now; in draw()
|
/packages/services/BuiltInPrintService/jni/plugins/ |
D | wprint_mupdf.c | 36 struct timespec now; in get_millis() local 37 clock_gettime(CLOCK_MONOTONIC, &now); in get_millis() 38 return (long) (((int64_t) now.tv_sec * 1000000000LL + now.tv_nsec) / 1000000); in get_millis() 75 long now = get_millis(); in _mupdf_get_hdr() local 84 LOGI("Render complete in %ld ms", get_millis() - now); in _mupdf_get_hdr()
|
/packages/apps/DeskClock/src/com/android/deskclock/data/ |
D | Timer.java | 28 import static com.android.deskclock.Utils.now; 152 final long timeSinceStart = now() - mLastStartTime; in getRemainingTime() 198 return new Timer(mId, RUNNING, mLength, mTotalLength, now(), wallClock(), mRemainingTime, in start() 226 return new Timer(mId, EXPIRED, mLength, 0L, now(), wallClock(), remainingTime, mLabel, in expire() 239 return new Timer(mId, MISSED, mLength, 0L, now(), wallClock(), remainingTime, mLabel, in miss() 263 final long timeSinceBoot = now(); in updateAfterReboot() 281 final long timeSinceBoot = now(); in updateAfterTimeSet() 348 lastStartTime = now(); in setRemainingTime()
|
D | Stopwatch.java | 19 import static com.android.deskclock.Utils.now; 74 final long timeSinceStart = now() - mLastStartTime; in getTotalTime() 93 return new Stopwatch(RUNNING, now(), wallClock(), getTotalTime()); in start() 123 final long timeSinceBoot = now(); in updateAfterReboot() 140 final long timeSinceBoot = now(); in updateAfterTimeSet()
|
D | Timer.kt | 102 val timeSinceStart = Utils.now() - lastStartTime in <lambda>() 144 Utils.now(), Utils.wallClock(), lastRemainingTime, label, deleteAfterUse) in <lambda>() 172 return Timer(id, State.EXPIRED, length, 0L, Utils.now(), in <lambda>() 185 return Timer(id, State.MISSED, length, 0L, Utils.now(), in <lambda>() 208 val timeSinceBoot = Utils.now() in <lambda>() 225 val timeSinceBoot = Utils.now() in <lambda>() 293 lastStartTime = Utils.now() in <lambda>()
|
D | Stopwatch.kt | 63 val timeSinceStart = Utils.now() - lastStartTime 74 Stopwatch(State.RUNNING, Utils.now(), Utils.wallClock(), totalTime) in start() 103 val timeSinceBoot = Utils.now() in reset() 120 val timeSinceBoot = Utils.now() in updateAfterTimeSet()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/system/ |
D | DateTimeFragment.java | 143 final Calendar now = Calendar.getInstance(); in updateTimeAndDateDisplay() local 144 mDummyDate.setTimeZone(now.getTimeZone()); in updateTimeAndDateDisplay() 147 mDummyDate.set(now.get(Calendar.YEAR), 11, 31, 13, 0, 0); in updateTimeAndDateDisplay() 149 mDatePref.setSummary(DateFormat.getLongDateFormat(context).format(now.getTime())); in updateTimeAndDateDisplay() 150 mTimePref.setSummary(DateFormat.getTimeFormat(getActivity()).format(now.getTime())); in updateTimeAndDateDisplay() 152 now.getTimeZone(), now.getTime())); in updateTimeAndDateDisplay()
|
/packages/apps/DeskClock/src/com/android/deskclock/uidata/ |
D | PeriodicCallbackModel.kt | 175 fun getDelay(now: Long, period: Period, offset: Long): Long { in getDelay() 176 val periodStart = now - offset in getDelay() 182 nextMinute - now + offset in getDelay() 187 nextQuarterHour - now + offset in getDelay() 192 nextHour - now + offset in getDelay() 202 nextMidnight.timeInMillis - now + offset in getDelay()
|
D | PeriodicCallbackModel.java | 141 static long getDelay(long now, Period period, long offset) { in getDelay() argument 142 final long periodStart = now - offset; in getDelay() 148 return nextMinute - now + offset; in getDelay() 153 return nextQuarterHour - now + offset; in getDelay() 158 return nextHour - now + offset; in getDelay() 168 return nextMidnight.getTimeInMillis() - now + offset; in getDelay()
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/action/ |
D | ProcessPendingMessagesAction.java | 221 final long now = System.currentTimeMillis(); in getHavePendingMessages() local 229 final String toSendMessageId = findNextMessageToSend(db, now, selfId); in getHavePendingMessages() 233 final String toDownloadMessageId = findNextMessageToDownload(db, now, selfId); in getHavePendingMessages() 251 final long now = System.currentTimeMillis(); in queueActions() local 268 final String toSendMessageId = findNextMessageToSend(db, now, selfId); in queueActions() 269 final String toDownloadMessageId = findNextMessageToDownload(db, now, selfId); in queueActions() 319 private static String findNextMessageToSend(final DatabaseWrapper db, final long now, in findNextMessageToSend() argument 360 if (message.getInResendWindow(now)) { in findNextMessageToSend() 414 private static String findNextMessageToDownload(final DatabaseWrapper db, final long now, in findNextMessageToDownload() argument
|
D | SyncMessagesAction.java | 81 final long now = System.currentTimeMillis(); in fullSync() local 83 final long startTimestamp = now - smsSyncBackoffTimeMillis; in fullSync() 99 final long now = System.currentTimeMillis(); in sync() local 101 final long startTimestamp = now - smsSyncBackoffTimeMillis; in sync() 111 final long now = System.currentTimeMillis(); in immediateSync() local 113 final long startTimestamp = now; in immediateSync() 464 final long now = System.currentTimeMillis(); in processBackgroundResponse() local 467 final SyncCursorPair recents = new SyncCursorPair(startTimestamp, now); in processBackgroundResponse() 476 new SyncMessagesAction(startTimestamp, now, 0, startTimestamp); in processBackgroundResponse() 477 syncManager.startSyncBatch(now); in processBackgroundResponse()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
D | ContactsManagerTest.java | 97 final long now = System.currentTimeMillis(); in testGetValidNamesAffinity() local 98 final long month_ago = now - TimeUnit.MILLISECONDS.convert(31, TimeUnit.DAYS); in testGetValidNamesAffinity() 100 mMatrixCursor.addRow(new Object[] { i, "name" + i, i, now, 1 }); in testGetValidNamesAffinity() 116 final long now = System.currentTimeMillis(); in testComputeAffinity() local 117 final long month_ago = now - TimeUnit.MILLISECONDS.convert(31, TimeUnit.DAYS); in testComputeAffinity() 127 contact.computeAffinity(2, now); in testComputeAffinity()
|
/packages/apps/DeskClock/src/com/android/deskclock/alarms/ |
D | AlarmTimeClickHandler.kt | 100 val now = Calendar.getInstance() in setAlarmRepeatEnabled() constant 101 val oldNextAlarmTime = alarm.getNextAlarmTime(now) in setAlarmRepeatEnabled() 122 val newNextAlarmTime = alarm.getNextAlarmTime(now) in setAlarmRepeatEnabled() 129 val now = Calendar.getInstance() in setDayOfWeekEnabled() constant 130 val oldNextAlarmTime = alarm.getNextAlarmTime(now) in setDayOfWeekEnabled() 136 val newNextAlarmTime = alarm.getNextAlarmTime(now) in setDayOfWeekEnabled()
|
D | AlarmTimeClickHandler.java | 106 final Calendar now = Calendar.getInstance(); in setAlarmRepeatEnabled() local 107 final Calendar oldNextAlarmTime = alarm.getNextAlarmTime(now); in setAlarmRepeatEnabled() 128 final Calendar newNextAlarmTime = alarm.getNextAlarmTime(now); in setAlarmRepeatEnabled() 136 final Calendar now = Calendar.getInstance(); in setDayOfWeekEnabled() local 137 final Calendar oldNextAlarmTime = alarm.getNextAlarmTime(now); in setDayOfWeekEnabled() 143 final Calendar newNextAlarmTime = alarm.getNextAlarmTime(now); in setDayOfWeekEnabled()
|
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/ |
D | FadeTexture.java | 40 mStartTime = now(); in FadeTexture() 66 if (now() - mStartTime >= DURATION) { in isAnimating() 74 float r = (float)(now() - mStartTime) / DURATION; in getRatio() 78 private long now() { in now() method in FadeTexture
|