Home
last modified time | relevance | path

Searched refs:now (Results 1 – 25 of 407) sorted by relevance

12345678910>>...17

/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/
DNetdEventListenerServiceTest.java84 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/
DDataUsageSummaryPreferenceControllerTest.java169 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/
DLinkProbeManager.java155 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()
312 long now = mClock.getElapsedSinceBootMillis(); in resetOnNewConnection() local
313 mLastLinkProbeTimestampMs = now; in resetOnNewConnection()
[all …]
/packages/apps/DeskClock/tests/src/com/android/deskclock/uidata/
DPeriodicCallbackModelTest.java93 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/cpp/watchdog/server/tests/
DIoPerfCollectionTest.cpp537 time_t now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); in TEST_F() local
539 mCollector->onBoottimeCollection(now, mMockUidStatsCollector, mMockProcStatCollector)); in TEST_F()
567 time_t now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); in TEST_F() local
569 mCollector->onWakeUpCollection(now, mMockUidStatsCollector, mMockProcStatCollector)); in TEST_F()
597 time_t now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); in TEST_F() local
599 mCollector->onBoottimeCollection(now, mMockUidStatsCollector, mMockProcStatCollector)); in TEST_F()
601 mCollector->onWakeUpCollection(now, mMockUidStatsCollector, mMockProcStatCollector)); in TEST_F()
628 time_t now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); in TEST_F() local
629 ASSERT_RESULT_OK(mCollector->onUserSwitchCollection(now, 100, 101, mMockUidStatsCollector, in TEST_F()
695 now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); in TEST_F()
[all …]
/packages/apps/Calendar/tests/src/com/android/calendar/widget/
DCalendarAppWidgetServiceTest.java44 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/Car/Settings/tests/unit/src/com/android/car/settingslib/enterprise/
DEnterprisePrivacyFeatureProviderImplTest.java62 long now = System.currentTimeMillis(); in testGetLastBugReportRequestTime_ok() local
63 mockGetLastBugreportTime(now); in testGetLastBugReportRequestTime_ok()
68 .isEqualTo(now); in testGetLastBugReportRequestTime_ok()
81 long now = System.currentTimeMillis(); in testGetLastNetworkLogRetrievalTime_ok() local
82 mockGetLastNetworkLogRetrievalTime(now); in testGetLastNetworkLogRetrievalTime_ok()
87 .isEqualTo(now); in testGetLastNetworkLogRetrievalTime_ok()
100 long now = System.currentTimeMillis(); in testGetLastSecurityLogRetrievalTime_ok() local
101 mockGetLastSecurityLogRetrievalTime(now); in testGetLastSecurityLogRetrievalTime_ok()
106 .isEqualTo(now); in testGetLastSecurityLogRetrievalTime_ok()
/packages/apps/Settings/src/com/android/settings/widget/
DDotsPageIndicator.java557 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/modules/Bluetooth/system/common/test/
Dthread_performance_test.cc123 std::chrono::steady_clock::now(); in TEST_F()
133 std::chrono::steady_clock::now(); in TEST_F()
168 std::chrono::steady_clock::now(); in TEST_F()
178 std::chrono::steady_clock::now(); in TEST_F()
214 std::chrono::steady_clock::now(); in TEST_F()
224 std::chrono::steady_clock::now(); in TEST_F()
257 std::chrono::steady_clock::now(); in TEST_F()
265 std::chrono::steady_clock::now(); in TEST_F()
305 std::chrono::steady_clock::now(); in TEST_F()
315 std::chrono::steady_clock::now(); in TEST_F()
[all …]
/packages/modules/DnsResolver/doh/
Dboot_time.rs58 pub fn now() -> BootTime { in now() method
76 BootTime::now().checked_duration_since(*self).unwrap() in elapsed()
180 BootTime::now().elapsed(); in monotonic_smoke()
188 let start = BootTime::now(); in round_trip()
190 let end = BootTime::now(); in round_trip()
200 let start = BootTime::now(); in timeout_drift()
208 let start = BootTime::now(); in timeout_drift()
218 let start = BootTime::now(); in timeout_duration_zero()
/packages/services/Car/cpp/watchdog/server/src/
DWatchdogPerfService.cpp235 mBoottimeCollection.lastUptime = mHandlerLooper->now(); in start()
312 nsecs_t endBootCollectionTime = mHandlerLooper->now() + mPostSystemEventDurationNs.count(); in onBootFinished()
376 mHandlerLooper->now() + mPostSystemEventDurationNs.count(); in onUserStateChange()
395 mUserSwitchCollection.lastUptime = mHandlerLooper->now(); in startUserSwitchCollection()
400 nsecs_t uptime = mHandlerLooper->now() + mUserSwitchTimeoutNs.count(); in startUserSwitchCollection()
424 mWakeUpCollection.lastUptime = mHandlerLooper->now(); in onSuspendExit()
425 nsecs_t uptime = mHandlerLooper->now() + mWakeUpDurationNs.count(); in onSuspendExit()
614 .lastUptime = mHandlerLooper->now(), in startCustomCollection()
620 nsecs_t uptime = mHandlerLooper->now() + maxDuration.count(); in startCustomCollection()
672 mPeriodicCollection.lastUptime = mHandlerLooper->now(); in switchToPeriodicLocked()
[all …]
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DConnectedClientsTracker.java81 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/Calendar/src/com/android/calendar/widget/
DCalendarAppWidgetService.kt103 fun formatDebugTime(unixTime: Long, now: Long): String { in formatDebugTime()
106 var delta = unixTime - now in formatDebugTime()
271 val now: Long = System.currentTimeMillis() in getViewAt() constant
272 if (!eventInfo.allDay && eventInfo.start <= now && now <= eventInfo.end) { in getViewAt()
438 val now: Long = System.currentTimeMillis() in createLoaderUri() constant
440 val begin: Long = now - DateUtils.DAY_IN_MILLIS in createLoaderUri()
442 now + SEARCH_DURATION + DateUtils.DAY_IN_MILLIS in createLoaderUri()
454 now: Long, in calculateUpdateTime()
466 if (now < start) { in calculateUpdateTime()
468 } else if (now < end) { in calculateUpdateTime()
[all …]
/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DLingerMonitor.java293 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/Bluetooth/system/blueberry/tests/gd/cert/
Devent_stream.py189 end_time = datetime.now() + timeout
190 while len(event_list) <= at_most_times and datetime.now() < end_time:
207 remaining = end_time - datetime.now()
225 end_time = datetime.now() + timeout
226 while len(event_list) < at_least_times and datetime.now() < end_time:
251 end_time = datetime.now() + timeout
252 while len(pending_matches) > 0 and datetime.now() < end_time:
282 end_time = datetime.now() + timeout
283 while event is None and datetime.now() < end_time:
/packages/modules/Bluetooth/system/common/
Dstop_watch_legacy.cc69 auto now = stopwatch_logs[current_buffer_index].timestamp; in DumpStopWatchLog() local
71 now.time_since_epoch()) % in DumpStopWatchLog()
73 auto now_time_t = std::chrono::system_clock::to_time_t(now); in DumpStopWatchLog()
91 timestamp_(std::chrono::system_clock::now()), in StopWatchLegacy()
92 start_timestamp_(std::chrono::high_resolution_clock::now()) {} in StopWatchLegacy()
98 sw_log.end_timestamp = std::chrono::high_resolution_clock::now(); in ~StopWatchLegacy()
/packages/modules/Bluetooth/system/gd/common/
Dstop_watch.cc69 auto now = stopwatch_logs[current_buffer_index].timestamp; in DumpStopWatchLog() local
71 now.time_since_epoch()) % in DumpStopWatchLog()
73 auto now_time_t = std::chrono::system_clock::to_time_t(now); in DumpStopWatchLog()
92 timestamp_(std::chrono::system_clock::now()), in StopWatch()
93 start_timestamp_(std::chrono::high_resolution_clock::now()) {} in StopWatch()
99 sw_log.end_timestamp = std::chrono::high_resolution_clock::now(); in ~StopWatch()
/packages/apps/Messaging/src/com/android/messaging/util/
DDates.java66 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/BuiltInPrintService/jni/plugins/
Dwprint_mupdf.c36 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/
DProgressSpinner.java60 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()
DGLRootView.java161 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()
/packages/modules/adb/client/openscreen/platform/
Dtask_runner.cpp52 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/DeskClock/src/com/android/deskclock/uidata/
DPeriodicCallbackModel.kt176 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/Bluetooth/system/bta/le_audio/
Dmetrics_collector.cc93 connecting_timepoint_ = std::chrono::high_resolution_clock::now(); in AddStateChangedEvent()
96 connected_timepoint_ = std::chrono::high_resolution_clock::now(); in AddStateChangedEvent()
100 disconnected_timepoint_ = std::chrono::high_resolution_clock::now(); in AddStateChangedEvent()
124 beginning_timepoint_ = std::chrono::high_resolution_clock::now(); in GroupMetricsImpl()
128 beginning_timepoint_ = std::chrono::high_resolution_clock::now(); in GroupMetricsImpl()
163 std::chrono::high_resolution_clock::now(), beginning_timepoint_)); in AddStreamStartedEvent()
174 get_timedelta_nanos(std::chrono::high_resolution_clock::now(), in AddStreamEndedEvent()
185 beginning_timepoint_, std::chrono::high_resolution_clock::now()); in WriteStats()
/packages/modules/NeuralNetworks/driver/sample/
DCanonicalPreparedModel.cpp138 if (measure == MeasureTiming::YES) driverStart = Clock::now(); in execute()
162 if (measure == MeasureTiming::YES) deviceStart = Clock::now(); in execute()
164 if (measure == MeasureTiming::YES) deviceEnd = Clock::now(); in execute()
181 driverEnd = Clock::now(); in execute()
200 if (measure == MeasureTiming::YES) driverStart = Clock::now(); in executeFenced()
233 if (measure == MeasureTiming::YES) driverStartAfterFence = Clock::now(); in executeFenced()
249 if (measure == MeasureTiming::YES) deviceStart = Clock::now(); in executeFenced()
251 if (measure == MeasureTiming::YES) deviceEnd = Clock::now(); in executeFenced()
271 driverEnd = Clock::now(); in executeFenced()

12345678910>>...17