/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/ |
D | NetdEventListenerServiceTest.java | 84 final long now = System.currentTimeMillis(); in testWakeupEventLogging() local 104 wakeupEvent(iface, uids[0], v4, tcp, mac, srcIp, dstIp, sport, dport, now); in testWakeupEventLogging() 105 wakeupEvent(iface, uids[1], v6, udp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging() 106 wakeupEvent(iface, uids[2], v6, udp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging() 107 wakeupEvent(iface, uids[3], v4, icmp6, mac, srcIp, dstIp, sport, dport, now); in testWakeupEventLogging() 108 wakeupEvent(iface, uids[4], v6, tcp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging() 109 wakeupEvent(iface, uids[5], v4, tcp, mac, srcIp, dstIp, sport, dport, now); in testWakeupEventLogging() 110 wakeupEvent(iface, uids[6], v6, udp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging() 111 wakeupEvent(iface, uids[7], v6, tcp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging() 112 wakeupEvent(iface, uids[8], v6, udp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/ |
D | DataUsageSummaryPreferenceControllerTest.java | 169 final long now = System.currentTimeMillis(); in testSummaryUpdate_onePlan_basic() local 170 final DataUsageController.DataUsageInfo info = createTestDataUsageInfo(now); in testSummaryUpdate_onePlan_basic() 175 setupTestDataUsage(LIMIT1, USAGE1, now - UPDATE_BACKOFF_MS); in testSummaryUpdate_onePlan_basic() 188 now - UPDATE_BACKOFF_MS, in testSummaryUpdate_onePlan_basic() 197 final long now = System.currentTimeMillis(); in testSummaryUpdate_noPlan_basic() local 198 final DataUsageController.DataUsageInfo info = createTestDataUsageInfo(now); in testSummaryUpdate_noPlan_basic() 203 setupTestDataUsage(LIMIT1, USAGE1, now - UPDATE_BACKOFF_MS); in testSummaryUpdate_noPlan_basic() 225 final long now = System.currentTimeMillis(); in testSummaryUpdate_noCarrier_basic() local 226 final DataUsageController.DataUsageInfo info = createTestDataUsageInfo(now); in testSummaryUpdate_noCarrier_basic() 252 final long now = System.currentTimeMillis(); in testSummaryUpdate_noPlanData_basic() local [all …]
|
/packages/modules/Wifi/service/java/com/android/server/wifi/ |
D | LinkProbeManager.java | 155 long now = mClock.getElapsedSinceBootMillis(); in resetOnNewConnection() local 156 mLastLinkProbeTimestampMs = now; in resetOnNewConnection() 157 mLastTxSuccessIncreaseTimestampMs = now; in resetOnNewConnection() 184 long now = mClock.getElapsedSinceBootMillis(); in updateConnectionStats() local 188 mLastTxSuccessIncreaseTimestampMs = now; in updateConnectionStats() 193 long timeSinceLastLinkProbeMs = now - mLastLinkProbeTimestampMs; in updateConnectionStats() 199 long timeSinceLastTxSuccessIncreaseMs = now - mLastTxSuccessIncreaseTimestampMs; in updateConnectionStats() 205 long timeSinceLastScreenOnMs = now - mLastScreenOnTimestampMs; in updateConnectionStats() 313 long now = mClock.getElapsedSinceBootMillis(); in resetOnNewConnection() local 314 mLastLinkProbeTimestampMs = now; in resetOnNewConnection() [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/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/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/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 | 371 private synchronized void updatePref64(IpPrefix prefix, final long now, in updatePref64() argument 378 if (expiry > now) { in updatePref64() 390 if (mNat64PrefixExpiry > now) return; in updatePref64() 393 if (expiry > now) { in updatePref64() 406 private void processPref64Option(StructNdOptPref64 opt, final long now) { in processPref64Option() argument 407 final long expiry = now + TimeUnit.SECONDS.toMillis(opt.lifetime); in processPref64Option() 408 updatePref64(opt.prefix, now, expiry); in processPref64Option() 520 long now = System.currentTimeMillis(); in addServers() local 521 long expiry = now + 1000 * lifetime; in addServers() 536 if (expiry > now) { in addServers() [all …]
|
/packages/modules/Connectivity/service/src/com/android/server/connectivity/ |
D | LingerMonitor.java | 293 final long now = SystemClock.elapsedRealtime(); in noteLingerDefaultNetwork() local 294 if (isRateLimited(now) || isAboveDailyLimit(now)) return; in noteLingerDefaultNetwork() 306 private boolean isRateLimited(long now) { in isRateLimited() argument 307 final long millisSinceLast = now - mLastNotificationMillis; in isRateLimited() 311 mLastNotificationMillis = now; in isRateLimited() 315 private boolean isAboveDailyLimit(long now) { in isAboveDailyLimit() argument 317 mFirstNotificationMillis = now; in isAboveDailyLimit() 319 final long millisSinceFirst = now - mFirstNotificationMillis; in isAboveDailyLimit()
|
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/ |
D | ConnectedClientsTracker.java | 81 final long now = mClock.elapsedRealtime(); in updateConnectedClients() local 97 final TetheredClient prunedClient = pruneExpired(client, now); in updateConnectedClients() 147 private static boolean hasExpiredAddress(List<AddressInfo> addresses, long now) { in hasExpiredAddress() argument 149 if (info.getExpirationTime() <= now) { in hasExpiredAddress() 157 private static TetheredClient pruneExpired(TetheredClient client, long now) { in pruneExpired() argument 160 if (!hasExpiredAddress(addresses, now)) return client; in pruneExpired() 164 if (info.getExpirationTime() > now) { in pruneExpired()
|
/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/services/Car/cpp/watchdog/server/src/ |
D | WatchdogPerfService.cpp | 213 mBoottimeCollection.lastUptime = mHandlerLooper->now(); in start() 289 mBoottimeCollection.lastUptime = mHandlerLooper->now(); in onBootFinished() 466 .lastUptime = mHandlerLooper->now(), in startCustomCollection() 471 nsecs_t uptime = mHandlerLooper->now() + maxDuration.count(); in startCustomCollection() 519 mPeriodicCollection.lastUptime = mHandlerLooper->now(); in handleMessage() 527 mPeriodicMonitor.lastUptime = mHandlerLooper->now() + mPeriodicMonitor.interval.count(); in handleMessage() 627 time_t now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); in collectLocked() local 651 result = processor->onBoottimeCollection(now, mUidIoStats, mProcStat, mProcPidStat); in collectLocked() 654 result = processor->onPeriodicCollection(now, mSystemState, mUidIoStats, mProcStat, in collectLocked() 658 result = processor->onCustomCollection(now, mSystemState, metadata->filterPackages, in collectLocked() [all …]
|
/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/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/modules/NeuralNetworks/driver/sample/ |
D | CanonicalPreparedModel.cpp | 143 if (measure == MeasureTiming::YES) driverStart = Clock::now(); in execute() 167 if (measure == MeasureTiming::YES) deviceStart = Clock::now(); in execute() 169 if (measure == MeasureTiming::YES) deviceEnd = Clock::now(); in execute() 186 driverEnd = Clock::now(); in execute() 203 if (measure == MeasureTiming::YES) driverStart = Clock::now(); in executeFenced() 232 if (measure == MeasureTiming::YES) driverStartAfterFence = Clock::now(); in executeFenced() 248 if (measure == MeasureTiming::YES) deviceStart = Clock::now(); in executeFenced() 250 if (measure == MeasureTiming::YES) deviceEnd = Clock::now(); in executeFenced() 269 driverEnd = Clock::now(); in executeFenced()
|
/packages/apps/DeskClock/src/com/android/deskclock/uidata/ |
D | PeriodicCallbackModel.kt | 176 fun getDelay(now: Long, period: Period, offset: Long): Long { in getDelay() 177 val periodStart = now - offset in getDelay() 183 nextMinute - now + offset in getDelay() 188 nextQuarterHour - now + offset in getDelay() 193 nextHour - now + offset in getDelay() 203 nextMidnight.timeInMillis - now + offset in getDelay()
|
/packages/modules/adb/client/openscreen/platform/ |
D | task_runner.cpp | 52 auto now = std::chrono::steady_clock::now(); in PostPackagedTaskWithDelay() local 55 tasks_.emplace(now + delay, std::move(task)); in PostPackagedTaskWithDelay() 79 while (timepoint > std::chrono::steady_clock::now()) { in TaskExecutorWorker() 98 if (task_with_delay->first > std::chrono::steady_clock::now()) { in TaskExecutorWorker()
|
/packages/apps/Car/Calendar/src/com/android/car/calendar/common/ |
D | EventsLiveData.java | 125 ZonedDateTime now = ZonedDateTime.now(mClock); in getEventsUntilTomorrow() local 128 ZonedDateTime startDateTime = now.truncatedTo(DAYS); in getEventsUntilTomorrow() 144 if (event.getDayEndInstant().isBefore(now.toInstant()) in getEventsUntilTomorrow() 299 ZonedDateTime now = ZonedDateTime.now(mClock); in updateAndScheduleNext() local 300 ZonedDateTime truncatedNowTime = now.truncatedTo(MINUTES); in updateAndScheduleNext() 302 long delayMs = updateTime.toInstant().toEpochMilli() - now.toInstant().toEpochMilli(); in updateAndScheduleNext()
|
/packages/modules/DnsResolver/ |
D | DnsTlsDispatcher.cpp | 202 auto now = std::chrono::steady_clock::now(); in query() local 206 xport->lastUsed = now; in query() 224 cleanup(now); in query() 263 void DnsTlsDispatcher::cleanup(std::chrono::time_point<std::chrono::steady_clock> now) { in cleanup() argument 266 if (now - mLastCleanup < IDLE_TIMEOUT) { in cleanup() 271 if (s->useCount == 0 && now - s->lastUsed > IDLE_TIMEOUT) { in cleanup() 277 mLastCleanup = now; in cleanup()
|
/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/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 372 if (!isActiveSubscription || !message.getInResendWindow(now)) { in findNextMessageToSend() 405 private static String findNextMessageToDownload(final DatabaseWrapper db, final long now, in findNextMessageToDownload() argument
|
/packages/apps/Car/Settings/src/com/android/car/settings/applications/ |
D | HibernatedAppsItemManager.java | 88 long now = System.currentTimeMillis(); in getNumHibernated() local 92 now - unusedThreshold, now); in getNumHibernated() 105 && (now - usageStats.getLastTimeAnyComponentUsed() < unusedThreshold in getNumHibernated() 106 || now - usageStats.getLastTimeVisible() < unusedThreshold)); in getNumHibernated()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/system/ |
D | DateTimeFragment.java | 157 final Calendar now = Calendar.getInstance(); in updateTimeAndDateDisplay() local 158 mDummyDate.setTimeZone(now.getTimeZone()); in updateTimeAndDateDisplay() 161 mDummyDate.set(now.get(Calendar.YEAR), 11, 31, 13, 0, 0); in updateTimeAndDateDisplay() 165 pref.setSummary(DateFormat.getLongDateFormat(context).format(now.getTime()))); in updateTimeAndDateDisplay() 167 pref.setSummary(DateFormat.getTimeFormat(getActivity()).format(now.getTime()))); in updateTimeAndDateDisplay() 170 now.getTimeZone(), now.getTime()))); in updateTimeAndDateDisplay()
|
/packages/apps/DeskClock/src/com/android/deskclock/data/ |
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>()
|