Home
last modified time | relevance | path

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

12345678910>>...32

/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/aggregation/
DBasalCaloriesAggregationTest.java84 Instant now = Instant.now(); in testAggregation_BasalCaloriesBurntTotal_noRecord() local
90 .setStartTime(now.minus(2, DAYS)) in testAggregation_BasalCaloriesBurntTotal_noRecord()
91 .setEndTime(now.minus(1, DAYS)) in testAggregation_BasalCaloriesBurntTotal_noRecord()
101 Instant now = Instant.now(); in testAggregation_BasalCaloriesBurntTotal_lbm() local
102 insertRecords(List.of(getBaseLeanBodyMassRecord(Instant.now(), 50000))); in testAggregation_BasalCaloriesBurntTotal_lbm()
107 .setStartTime(Instant.now().minus(2, DAYS)) in testAggregation_BasalCaloriesBurntTotal_lbm()
108 .setEndTime(Instant.now().minus(1, DAYS)) in testAggregation_BasalCaloriesBurntTotal_lbm()
114 insertRecords(List.of(getBaseLeanBodyMassRecord(now.minus(2, DAYS), 50000))); in testAggregation_BasalCaloriesBurntTotal_lbm()
119 .setStartTime(Instant.now().minus(2, DAYS)) in testAggregation_BasalCaloriesBurntTotal_lbm()
120 .setEndTime(Instant.now().minus(1, DAYS)) in testAggregation_BasalCaloriesBurntTotal_lbm()
[all …]
DTotalCaloriesAggregationTest.java96 Instant now = Instant.now(); in totalCaloriesBurned_derivedFromDefaultBasalCalories() local
99 new AggregateRecordsRequest.Builder<Energy>(getTimeFilter(now.minus(1, DAYS), now)) in totalCaloriesBurned_derivedFromDefaultBasalCalories()
109 Instant now = Instant.now(); in totalCaloriesBurned_derivedFromWeightAndHeight() local
118 new AggregateRecordsRequest.Builder<Energy>(getTimeFilter(now.minus(1, DAYS), now)) in totalCaloriesBurned_derivedFromWeightAndHeight()
129 Instant now = Instant.now(); in totalCaloriesBurned_derivedFromLbm() local
134 new AggregateRecordsRequest.Builder<Energy>(getTimeFilter(now.minus(1, DAYS), now)) in totalCaloriesBurned_derivedFromLbm()
144 Instant now = Instant.now(); in totalCaloriesBurned_derivedFromBmr() local
149 new AggregateRecordsRequest.Builder<Energy>(getTimeFilter(now.minus(1, DAYS), now)) in totalCaloriesBurned_derivedFromBmr()
160 Instant now = Instant.now(); in totalCaloriesBurned_hasActiveCaloriesData_sumActiveAndBasalCalories() local
164 activeCalories, now.minus(3, HOURS), now.minus(2, HOURS))); in totalCaloriesBurned_hasActiveCaloriesData_sumActiveAndBasalCalories()
[all …]
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/datatypes/
DExerciseSessionRecordTest.java99 .setEndTime(Instant.now()) in tearDown()
315 ZoneOffset.systemDefault().getRules().getOffset(Instant.now()); in testExerciseSessionBuilds_zoneOffsets_offsetsAreDefault()
447 LocalDateTime now = LocalDateTime.now(ZoneOffset.MIN); in testDeleteRecords_insertAndDeleteByLocalDate_deletedRecordsNotFound() local
451 now.toInstant(ZoneOffset.MIN), in testDeleteRecords_insertAndDeleteByLocalDate_deletedRecordsNotFound()
452 now.toInstant(ZoneOffset.MIN).plusSeconds(1), in testDeleteRecords_insertAndDeleteByLocalDate_deletedRecordsNotFound()
457 now.toInstant(ZoneOffset.MAX).plusMillis(1999), in testDeleteRecords_insertAndDeleteByLocalDate_deletedRecordsNotFound()
458 now.toInstant(ZoneOffset.MAX).plusSeconds(3), in testDeleteRecords_insertAndDeleteByLocalDate_deletedRecordsNotFound()
463 now.toInstant(ZoneOffset.MAX).plusSeconds(2), in testDeleteRecords_insertAndDeleteByLocalDate_deletedRecordsNotFound()
464 now.toInstant(ZoneOffset.MAX).plusSeconds(3), in testDeleteRecords_insertAndDeleteByLocalDate_deletedRecordsNotFound()
475 .setStartTime(now) in testDeleteRecords_insertAndDeleteByLocalDate_deletedRecordsNotFound()
[all …]
DSpeedRecordTest.java99 .setEndTime(Instant.now()) in tearDown()
162 .setStartTime(Instant.now()) in testReadSpeedRecordUsingFilters_timeFilter()
163 .setEndTime(Instant.now().plusMillis(3000)) in testReadSpeedRecordUsingFilters_timeFilter()
232 .setStartTime(Instant.now()) in testDeleteSpeedRecord_time_filters()
233 .setEndTime(Instant.now().plusMillis(1000)) in testDeleteSpeedRecord_time_filters()
301 .setStartTime(Instant.now()) in testDeleteSpeedRecord_time_range()
302 .setEndTime(Instant.now().plusMillis(1000)) in testDeleteSpeedRecord_time_range()
312 ZoneOffset.systemDefault().getRules().getOffset(Instant.now()); in testZoneOffsets()
318 Instant.now(), in testZoneOffsets()
319 Instant.now().plusMillis(1000), in testZoneOffsets()
[all …]
DStepsRecordTest.java121 .setEndTime(Instant.now().plus(1, ChronoUnit.DAYS)) in tearDown()
289 LocalDateTime recordTime = LocalDateTime.now(ZoneOffset.MIN); in testReadStepsRecordUsingFilters_timeFilterLocal()
498 LocalDateTime recordTime = LocalDateTime.now(ZoneOffset.MIN).minus(10, ChronoUnit.SECONDS); in testReadStepsRecordUsingFiltersLocal_withPageSize()
548 LocalDateTime recordTime = LocalDateTime.now(ZoneOffset.MIN); in testDeleteStepsRecord_time_filters_local()
721 .setEndTime(Instant.now()) in testDeleteStepsRecord_usingTime_forAnotherApp_notDeleted()
736 ZoneOffset.systemDefault().getRules().getOffset(Instant.now()); in testZoneOffsets()
742 Instant.now(), in testZoneOffsets()
743 Instant.now().plusMillis(1000), in testZoneOffsets()
812 Instant start = Instant.now().minus(1, ChronoUnit.DAYS); in testAggregation_recordStartsBeforeAggWindow_returnsRescaledStepsCountInResult()
833 .isEqualTo(ZoneOffset.systemDefault().getRules().getOffset(Instant.now())); in testAggregation_recordStartsBeforeAggWindow_returnsRescaledStepsCountInResult()
[all …]
DHeightRecordTest.java97 .setEndTime(Instant.now()) in tearDown()
162 .setStartTime(Instant.now()) in testReadHeightRecordUsingFilters_timeFilter()
163 .setEndTime(Instant.now().plusMillis(3000)) in testReadHeightRecordUsingFilters_timeFilter()
254 .setStartTime(Instant.now()) in testDeleteHeightRecord_time_filters()
255 .setEndTime(Instant.now().plusMillis(1000)) in testDeleteHeightRecord_time_filters()
323 .setStartTime(Instant.now()) in testDeleteHeightRecord_time_range()
324 .setEndTime(Instant.now().plusMillis(1000)) in testDeleteHeightRecord_time_range()
345 .setEndTime(Instant.now().plus(1, ChronoUnit.DAYS)) in testAggregation_Height()
374 ZoneOffset.systemDefault().getRules().getOffset(Instant.now()); in testZoneOffsets()
378 new Metadata.Builder().build(), Instant.now(), Length.fromMeters(1.0)); in testZoneOffsets()
[all …]
DHeartRateRecordTest.java98 .setEndTime(Instant.now()) in tearDown()
149 new HeartRateRecord.HeartRateSample(301, Instant.now().plusMillis(100)); in testCreateHeartRateRecord_invalidValue()
184 .setStartTime(Instant.now()) in testReadHeartRateRecordUsingFilters_timeFilter()
185 .setEndTime(Instant.now().plusMillis(3000)) in testReadHeartRateRecordUsingFilters_timeFilter()
242 getHeartRateRecord(72, Instant.now().minus(1, ChronoUnit.DAYS)), in testReadHeartRateRecordUsingFilters_withPageSize()
243 getHeartRateRecord(72, Instant.now().minus(2, ChronoUnit.DAYS))); in testReadHeartRateRecordUsingFilters_withPageSize()
257 getHeartRateRecord(72, Instant.now().minusMillis(1000)), in testReadHeartRateRecordUsingFilters_withPageToken()
258 getHeartRateRecord(72, Instant.now().minusMillis(2000)), in testReadHeartRateRecordUsingFilters_withPageToken()
259 getHeartRateRecord(72, Instant.now().minusMillis(3000)), in testReadHeartRateRecordUsingFilters_withPageToken()
260 getHeartRateRecord(72, Instant.now().minusMillis(4000))); in testReadHeartRateRecordUsingFilters_withPageToken()
[all …]
DDistanceRecordTest.java89 .setEndTime(Instant.now()) in tearDown()
103 .setEndTime(Instant.now()) in setup()
170 .setStartTime(Instant.now()) in testReadDistanceRecordUsingFilters_timeFilter()
171 .setEndTime(Instant.now().plusMillis(3000)) in testReadDistanceRecordUsingFilters_timeFilter()
239 .setStartTime(Instant.now()) in testDeleteDistanceRecord_time_filters()
240 .setEndTime(Instant.now().plusMillis(1000)) in testDeleteDistanceRecord_time_filters()
310 .setStartTime(Instant.now()) in testDeleteDistanceRecord_time_range()
311 .setEndTime(Instant.now().plusMillis(1000)) in testDeleteDistanceRecord_time_range()
357 ZoneOffset.systemDefault().getRules().getOffset(Instant.now()); in testZoneOffsets()
363 Instant.now(), in testZoneOffsets()
[all …]
DActiveCaloriesBurnedRecordTest.java83 .setEndTime(Instant.now()) in tearDown()
92 Instant.now(), in testCreateActiveCaloriesBurnedRecord_invalidValue()
93 Instant.now().plus(1, ChronoUnit.HOURS), in testCreateActiveCaloriesBurnedRecord_invalidValue()
179 .setStartTime(Instant.now()) in testReadActiveCaloriesBurnedRecordUsingFilters_timeFilter()
180 .setEndTime(Instant.now().plusMillis(3000)) in testReadActiveCaloriesBurnedRecordUsingFilters_timeFilter()
258 .setStartTime(Instant.now()) in testDeleteActiveCaloriesBurnedRecord_time_filters()
259 .setEndTime(Instant.now().plusMillis(1000)) in testDeleteActiveCaloriesBurnedRecord_time_filters()
336 .setStartTime(Instant.now()) in testDeleteActiveCaloriesBurnedRecord_time_range()
337 .setEndTime(Instant.now().plusMillis(1000)) in testDeleteActiveCaloriesBurnedRecord_time_range()
347 ZoneOffset.systemDefault().getRules().getOffset(Instant.now()); in testZoneOffsets()
[all …]
DFloorsClimbedRecordTest.java84 .setEndTime(Instant.now()) in tearDown()
106 Instant startTime = Instant.now(); in testCreateFloorsClimbedRecord_sameStartEndTime()
164 .setStartTime(Instant.now()) in testReadFloorsClimbedRecordUsingFilters_timeFilter()
165 .setEndTime(Instant.now().plusMillis(3000)) in testReadFloorsClimbedRecordUsingFilters_timeFilter()
235 .setEndTime(Instant.now().plus(1, ChronoUnit.DAYS)) in testTotalAggregation_oneRecord_returnsItsTotal()
254 .setEndTime(Instant.now().plus(1, ChronoUnit.DAYS)) in testAggregation_FloorsClimbedTotal()
266 .setEndTime(Instant.now().plus(1, ChronoUnit.DAYS)) in testAggregation_FloorsClimbedTotal()
289 ZoneOffset.systemDefault().getRules().getOffset(Instant.now()); in testZoneOffsets()
295 Instant.now(), in testZoneOffsets()
296 Instant.now().plusMillis(1000), in testZoneOffsets()
[all …]
DElevationGainedRecordTest.java89 .setEndTime(Instant.now()) in tearDown()
165 .setStartTime(Instant.now()) in testReadElevationGainedRecordUsingFilters_timeFilter()
166 .setEndTime(Instant.now().plusMillis(3000)) in testReadElevationGainedRecordUsingFilters_timeFilter()
239 .setStartTime(Instant.now()) in testDeleteElevationGainedRecord_time_filters()
240 .setEndTime(Instant.now().plusMillis(1000)) in testDeleteElevationGainedRecord_time_filters()
315 .setStartTime(Instant.now()) in testDeleteElevationGainedRecord_time_range()
316 .setEndTime(Instant.now().plusMillis(1000)) in testDeleteElevationGainedRecord_time_range()
362 .setEndTime(Instant.now().plus(1, ChronoUnit.DAYS)) in testAggregation_ElevationTotal()
374 .setEndTime(Instant.now().plus(1, ChronoUnit.DAYS)) in testAggregation_ElevationTotal()
397 ZoneOffset.systemDefault().getRules().getOffset(Instant.now()); in testZoneOffsets()
[all …]
DWheelchairPushesRecordTest.java84 .setEndTime(Instant.now()) in tearDown()
164 .setStartTime(Instant.now()) in testReadWheelchairPushesRecordUsingFilters_timeFilter()
165 .setEndTime(Instant.now().plusMillis(3000)) in testReadWheelchairPushesRecordUsingFilters_timeFilter()
243 .setEndTime(Instant.now().plus(1, ChronoUnit.DAYS)) in testAggregation_countTotal()
255 .setEndTime(Instant.now().plus(1, ChronoUnit.DAYS)) in testAggregation_countTotal()
276 ZoneOffset.systemDefault().getRules().getOffset(Instant.now()); in testZoneOffsets()
282 Instant.now(), in testZoneOffsets()
283 Instant.now().plusMillis(1000), in testZoneOffsets()
491 Instant.now(), in testCreateWheelchairPushesRecord_invalidValue()
492 Instant.now().plusMillis(1000), in testCreateWheelchairPushesRecord_invalidValue()
[all …]
DPowerRecordTest.java91 .setEndTime(Instant.now()) in tearDown()
151 .setStartTime(Instant.now()) in testReadPowerRecordUsingFilters_timeFilter()
152 .setEndTime(Instant.now().plusMillis(3000)) in testReadPowerRecordUsingFilters_timeFilter()
220 .setStartTime(Instant.now()) in testDeletePowerRecord_time_filters()
221 .setEndTime(Instant.now().plusMillis(1000)) in testDeletePowerRecord_time_filters()
289 .setStartTime(Instant.now()) in testDeletePowerRecord_time_range()
290 .setEndTime(Instant.now().plusMillis(1000)) in testDeletePowerRecord_time_range()
308 .setEndTime(Instant.now().plus(1, ChronoUnit.DAYS)) in testAggregation_power()
337 ZoneOffset.systemDefault().getRules().getOffset(Instant.now()); in testZoneOffsets()
343 Instant.now(), in testZoneOffsets()
[all …]
DHydrationRecordTest.java84 .setEndTime(Instant.now()) in tearDown()
153 .setStartTime(Instant.now()) in testReadHydrationRecordUsingFilters_timeFilter()
154 .setEndTime(Instant.now().plusMillis(3000)) in testReadHydrationRecordUsingFilters_timeFilter()
222 .setStartTime(Instant.now()) in testDeleteHydrationRecord_time_filters()
223 .setEndTime(Instant.now().plusMillis(1000)) in testDeleteHydrationRecord_time_filters()
294 .setStartTime(Instant.now()) in testDeleteHydrationRecord_time_range()
295 .setEndTime(Instant.now().plusMillis(1000)) in testDeleteHydrationRecord_time_range()
312 .setEndTime(Instant.now().plus(1, ChronoUnit.DAYS)) in testAggregation_VolumeTotal()
324 .setEndTime(Instant.now().plus(1, ChronoUnit.DAYS)) in testAggregation_VolumeTotal()
347 ZoneOffset.systemDefault().getRules().getOffset(Instant.now()); in testZoneOffsets()
[all …]
/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/async/
DRateLimiter.java65 final long now = limiter1.mOsAccess.monotonicTimeMillis(); in limit() local
66 final int allowedCount = Math.min(limiter1.calculateLimit(now, requestedBytes), in limit()
67 limiter2.calculateLimit(now, requestedBytes)); in limit()
68 limiter1.recordBytes(now, requestedBytes, allowedCount); in limit()
69 limiter2.recordBytes(now, requestedBytes, allowedCount); in limit()
74 final long now = mOsAccess.monotonicTimeMillis(); in limit() local
75 final int allowedCount = calculateLimit(now, requestedBytes); in limit()
76 recordBytes(now, requestedBytes, allowedCount); in limit()
85 final long now = mOsAccess.monotonicTimeMillis(); in acceptAllOrNone() local
86 final int allowedCount = calculateLimit(now, requestedBytes); in acceptAllOrNone()
[all …]
/packages/modules/Connectivity/service-t/src/com/android/server/connectivity/mdns/
DMdnsQueryScheduler.java66 public ScheduledQueryTaskArgs maybeRescheduleCurrentRun(long now, in maybeRescheduleCurrentRun() argument
76 mLastScheduledQueryTaskArgs.config, now, minRemainingTtl, lastSentTime); in maybeRescheduleCurrentRun()
84 minRemainingTtl + now, in maybeRescheduleCurrentRun()
96 long now, in scheduleNextRun() argument
102 timeToRun = now + nextRunConfig.delayUntilNextTaskWithoutBackoffMs; in scheduleNextRun()
105 nextRunConfig, now, minRemainingTtl, lastSentTime); in scheduleNextRun()
108 minRemainingTtl + now, in scheduleNextRun()
117 long now, long minRemainingTtl, long currentSessionId) { in scheduleFirstRun() argument
118 mLastScheduledQueryTaskArgs = new ScheduledQueryTaskArgs(taskConfig, now /* timeToRun */, in scheduleFirstRun()
119 now + minRemainingTtl/* minTtlExpirationTimeWhenScheduled */, in scheduleFirstRun()
[all …]
DMdnsServiceCache.java166 List<MdnsResponse> responses, MdnsResponse response, long now) { in insertResponseAndSortList() argument
171 (o1, o2) -> Long.compare(o1.getMinRemainingTtl(now), o2.getMinRemainingTtl(now))); in insertResponseAndSortList()
190 final long now = mClock.elapsedRealtime(); in addOrUpdateService() local
192 insertResponseAndSortList(responses, response, now); in addOrUpdateService()
194 mNextExpirationTime = getNextExpirationTime(now); in addOrUpdateService()
271 long now) { in removeExpiredServices() argument
278 if (!response.hasServiceRecord() || response.getMinRemainingTtl(now) > 0) { in removeExpiredServices()
290 private long getNextExpirationTime(long now) { in getNextExpirationTime() argument
301 mCachedServices.valueAt(i).get(0).getMinRemainingTtl(now)); in getNextExpirationTime()
303 return minRemainingTtl == EXPIRATION_NEVER ? EXPIRATION_NEVER : now + minRemainingTtl; in getNextExpirationTime()
[all …]
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/
DNetdEventListenerServiceTest.java86 final long now = System.currentTimeMillis(); in testWakeupEventLogging() local
106 wakeupEvent(iface, uids[0], v4, tcp, mac, srcIp, dstIp, sport, dport, now); in testWakeupEventLogging()
107 wakeupEvent(iface, uids[1], v6, udp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging()
108 wakeupEvent(iface, uids[2], v6, udp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging()
109 wakeupEvent(iface, uids[3], v4, icmp6, mac, srcIp, dstIp, sport, dport, now); in testWakeupEventLogging()
110 wakeupEvent(iface, uids[4], v6, tcp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging()
111 wakeupEvent(iface, uids[5], v4, tcp, mac, srcIp, dstIp, sport, dport, now); in testWakeupEventLogging()
112 wakeupEvent(iface, uids[6], v6, udp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging()
113 wakeupEvent(iface, uids[7], v6, tcp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging()
114 wakeupEvent("rmnet0", uids[8], v6, udp, EmptyArray.BYTE, srcIp6, dstIp6, sport, dport, now, in testWakeupEventLogging()
[all …]
/packages/modules/Connectivity/staticlibs/netd/libnetdutils/include/netdutils/
DStopwatch.h31 Stopwatch() : mStart(clock::now()) {} in Stopwatch()
34 int64_t timeTakenUs() const { return getElapsedUs(clock::now()); } in timeTakenUs()
36 const auto& now = clock::now(); in getTimeAndResetUs() local
37 int64_t elapsed = getElapsedUs(now); in getTimeAndResetUs()
38 mStart = now; in getTimeAndResetUs()
45 int64_t getElapsedUs(const time_point& now) const { in getElapsedUs() argument
46 return (std::chrono::duration_cast<std::chrono::microseconds>(now - mStart)).count(); in getElapsedUs()
/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/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/
DSharedMemoryTest.java99 Instant now = Instant.now(); in insertRecordsAndReadRecordsByFilter_viaSharedMemory_recordsEqual() local
105 now.minusMillis(i), in insertRecordsAndReadRecordsByFilter_viaSharedMemory_recordsEqual()
133 Instant now = Instant.now(); in insertRecordsAndReadRecordsByIds_viaSharedMemory_recordsEqual() local
142 now.minusMillis(i), in insertRecordsAndReadRecordsByIds_viaSharedMemory_recordsEqual()
153 now.minusMillis(5000), in insertRecordsAndReadRecordsByIds_viaSharedMemory_recordsEqual()
183 Instant now = Instant.now().truncatedTo(ChronoUnit.SECONDS); in seriesDataWithHugeSampleCount_viaSharedMemory_recordEqual() local
189 new HeartRateRecord.HeartRateSample(heartRate, now.minusMillis(i)); in seriesDataWithHugeSampleCount_viaSharedMemory_recordEqual()
196 now.minusMillis(sampleCount + 1), in seriesDataWithHugeSampleCount_viaSharedMemory_recordEqual()
197 now.plusMillis(1), in seriesDataWithHugeSampleCount_viaSharedMemory_recordEqual()
234 Instant now = Instant.now(); in getChangeLogs_viaSharedMemory_recordsMatch() local
[all …]
/packages/apps/Car/Notification/tests/unit/src/com/android/car/notification/
DCarHeadsUpNotificationQueueTest.java291 Instant now = Instant.now(); in triggerCallback_expireNotifications_whenParked() local
292 mCarHeadsUpNotificationQueue.setClock(Clock.fixed(now, ZoneId.systemDefault())); in triggerCallback_expireNotifications_whenParked()
294 "key1", "msg"), now.minusMillis(3000).toEpochMilli()); in triggerCallback_expireNotifications_whenParked()
296 "key2", "msg"), now.minusMillis(500).toEpochMilli()); in triggerCallback_expireNotifications_whenParked()
298 "key3", "msg"), now.toEpochMilli()); in triggerCallback_expireNotifications_whenParked()
326 Instant now = Instant.now(); in triggerCallback_doesNot_expireNotifications_whenParked() local
327 mCarHeadsUpNotificationQueue.setClock(Clock.fixed(now, ZoneId.systemDefault())); in triggerCallback_doesNot_expireNotifications_whenParked()
329 "key1", "msg"), now.minusMillis(3000).toEpochMilli()); in triggerCallback_doesNot_expireNotifications_whenParked()
331 "key2", "msg"), now.minusMillis(500).toEpochMilli()); in triggerCallback_doesNot_expireNotifications_whenParked()
333 "key3", "msg"), now.toEpochMilli()); in triggerCallback_doesNot_expireNotifications_whenParked()
[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/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/kanon/
DServerParametersDaoTest.java35 private static final Instant INSTANT_1 = Instant.now();
36 private static final Instant INSTANT_2 = Instant.now().plusSeconds(123);
37 private static final Instant INSTANT_3 = Instant.now().plusSeconds(1245);
39 private static final Instant STATIC_INSTANT = Instant.now();
60 mServerParametersDao.getActiveServerParameters(Instant.now()); in testGetActiveServerParameters_noActiveParamsPresents_returnsNull()
121 .setServerParamsSignExpiryInstant(Instant.now().minusSeconds(100)) in testDeleteAllParameters_deletesAllParameters()
125 .setServerParamsSignExpiryInstant(Instant.now().minusSeconds(100)) in testDeleteAllParameters_deletesAllParameters()
133 mServerParametersDao.getActiveServerParameters(Instant.now()); in testDeleteAllParameters_deletesAllParameters()

12345678910>>...32