Home
last modified time | relevance | path

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

12345678910>>...59

/aosp12/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
H A DScheduleConditionProviderTest.java82 Calendar now = getNow(); in testEvaluateSubscription_noAlarmExit_InSchedule() local
99 conditionId, cal, now.getTimeInMillis(), now.getTimeInMillis() + 1000); in testEvaluateSubscription_noAlarmExit_InSchedule()
106 Calendar now = getNow(); in testEvaluateSubscription_noAlarmExit_InScheduleSnoozed() local
125 conditionId, cal, now.getTimeInMillis(), now.getTimeInMillis() + 1000); in testEvaluateSubscription_noAlarmExit_InScheduleSnoozed()
153 conditionId, cal, now.getTimeInMillis(), now.getTimeInMillis() + 1000); in testEvaluateSubscription_noAlarmExit_beforeSchedule()
176 conditionId, cal, now.getTimeInMillis(), now.getTimeInMillis() + 1000); in testEvaluateSubscription_noAlarmExit_endSchedule()
197 conditionId, cal, now.getTimeInMillis(), now.getTimeInMillis() + 1000); in testEvaluateSubscription_alarmSetBeforeInSchedule()
250 conditionId, cal, now.getTimeInMillis(), now.getTimeInMillis() + 2000); in testEvaluateSubscription_earlierAlarmSet()
279 conditionId, cal, now.getTimeInMillis(), now.getTimeInMillis() + 500); in testEvaluateSubscription_laterAlarmSet()
308 conditionId, cal, now.getTimeInMillis(), now.getTimeInMillis() + 500); in testEvaluateSubscription_alarmCanceled()
[all …]
H A DScheduleCalendarTest.java214 now.set(Calendar.MINUTE, 15); in testShouldExitForAlarm_oldAlarm()
215 now.set(Calendar.SECOND, 0); in testShouldExitForAlarm_oldAlarm()
216 now.set(Calendar.MILLISECOND, 0); in testShouldExitForAlarm_oldAlarm()
428 now.set(Calendar.MINUTE, 10); in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger_daylightSavings()
429 now.set(Calendar.SECOND, 0); in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger_daylightSavings()
448 now.getTimeInMillis())); in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger_daylightSavings()
461 now.set(Calendar.MINUTE, 10); in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger()
462 now.set(Calendar.SECOND, 0); in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger()
476 now.getTimeInMillis())); in testIsAlarmInSchedule_alarmAndNowInSchedule_sameScheduleTrigger()
489 now.set(Calendar.MINUTE, 15); in testIsAlarmInSchedule_alarmAndNowInSchedule_differentScheduleTrigger()
[all …]
/aosp12/art/libartbase/base/
H A Dtime_utils.cc142 timespec now; in GetIsoDate() local
145 ns = now.tv_nsec; in GetIsoDate()
161 timespec now; in MilliTime() local
165 timeval now; in MilliTime()
173 timespec now; in MicroTime() local
177 timeval now; in MicroTime()
179 return static_cast<uint64_t>(now.tv_sec) * UINT64_C(1000000) + now.tv_usec; in MicroTime()
185 timespec now; in NanoTime() local
189 timeval now; in NanoTime()
197 timespec now; in ThreadCpuNanoTime() local
[all …]
/aosp12/frameworks/base/core/java/com/android/internal/app/procstats/
H A DServiceState.java223 public void resetSafely(long now) { in resetSafely() argument
259 mRunStartTime = now; in commitStateTime()
264 mStartedStartTime = now; in commitStateTime()
269 mBoundStartTime = now; in commitStateTime()
274 mExecStartTime = now; in commitStateTime()
295 mRunStartTime = now; in updateRunning()
324 mStartedStartTime = now; in updateStartedState()
350 mBoundStartTime = now; in setBound()
368 mExecStartTime = now; in setExecuting()
392 long now) { in getDuration() argument
[all …]
H A DAssociationState.java150 return now; in start()
153 long start(long now) { in start() argument
156 if (now < 0) { in start()
162 return now; in start()
175 long stop(long now) { in stop() argument
178 if (now < 0) { in stop()
182 stopTracking(now); in stop()
184 return now; in stop()
285 stopActive(now); in stopActiveIfNecessary()
360 stopActive(now); in stopTracking()
[all …]
/aosp12/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/
H A DJobPackageTracker.java162 long getTotalTime(long now) { in getTotalTime() argument
455 void rebatchIfNeeded(long now) { in rebatchIfNeeded() argument
469 job.madePending = now; in notePending()
470 rebatchIfNeeded(now); in notePending()
477 rebatchIfNeeded(now); in noteNonpending()
482 job.madeActive = now; in noteActive()
483 rebatchIfNeeded(now); in noteActive()
501 rebatchIfNeeded(now); in noteInactive()
526 time += cur.getActiveTime(now) + cur.getPendingTime(now); in getLoadFactor()
530 time += last.getActiveTime(now) + last.getPendingTime(now); in getLoadFactor()
[all …]
/aosp12/system/security/keystore/tests/
H A Dconfirmationui_rate_limiting_test.cpp79 auto now = std::chrono::steady_clock::now(); in TEST() local
81 FakeClock::setNow(now); in TEST()
93 auto now = std::chrono::steady_clock::now(); in TEST() local
95 FakeClock::setNow(now); in TEST()
154 FakeClock::setNow(FakeClock::now() + 1s); in TEST()
220 auto now = std::chrono::steady_clock::now(); in TEST() local
225 FakeClock::setNow(now); in TEST()
240 FakeClock::setNow(FakeClock::now() + 1s); in TEST()
244 FakeClock::setNow(FakeClock::now() - 1s); in TEST()
246 FakeClock::setNow(FakeClock::now() + 1s); in TEST()
[all …]
/aosp12/frameworks/base/services/core/java/com/android/server/pm/
H A DSnapshotStatistics.java307 private Stats(long now) { in Stats() argument
308 mStartTimeUs = now; in Stats()
498 mLong[0] = new Stats(now); in SnapshotStatistics()
500 mShort[0] = new Stats(now); in SnapshotStatistics()
539 mLastBuildTime = now; in rebuild()
576 private void shift(Stats[] s, long now) { in shift() argument
577 s[0].complete(now); in shift()
581 s[0] = new Stats(now); in shift()
599 shift(mLong, now); in tick()
601 shift(mShort, now); in tick()
[all …]
/aosp12/frameworks/base/services/tests/mockingservicestests/src/com/android/server/utils/quota/
H A DCountQuotaTrackerTest.java218 mInjector.mElapsedTime = now; in logEventAt()
234 logEventAt(now - 6 * HOUR_IN_MILLIS); in testDeleteObsoleteEventsLocked()
235 logEventAt(now - 5 * HOUR_IN_MILLIS); in testDeleteObsoleteEventsLocked()
236 logEventAt(now - 4 * HOUR_IN_MILLIS); in testDeleteObsoleteEventsLocked()
237 logEventAt(now - 3 * HOUR_IN_MILLIS); in testDeleteObsoleteEventsLocked()
238 logEventAt(now - 2 * HOUR_IN_MILLIS); in testDeleteObsoleteEventsLocked()
239 logEventAt(now - HOUR_IN_MILLIS); in testDeleteObsoleteEventsLocked()
240 logEventAt(now - 1); in testDeleteObsoleteEventsLocked()
244 expectedEvents.addLast(now - 1); in testDeleteObsoleteEventsLocked()
314 logEventAt(now - HOUR_IN_MILLIS); in testUpdateExecutionStatsLocked_NoTimer()
[all …]
/aosp12/frameworks/native/opengl/tests/finish/
H A Dfinish.cpp77 long long now, t; in main() local
90 now = systemTime(); in main()
93 printf("memcpy() time = %llu us\n", (t-now)/1000); in main()
107 now = systemTime(); in main()
121 now = systemTime(); in main()
135 now = systemTime(); in main()
150 now = systemTime(); in main()
168 now = systemTime(); in main()
187 now = systemTime(); in main()
200 now = systemTime(); in main()
[all …]
/aosp12/frameworks/base/media/packages/BluetoothMidiService/src/com/android/bluetoothmidiservice/
H A DMidiBtleTimeTracker.java40 public MidiBtleTimeTracker(long now) { in MidiBtleTimeTracker() argument
42 mBaseHostTimeNanos = now; in MidiBtleTimeTracker()
43 mPreviousNow = now; in MidiBtleTimeTracker()
53 public long convertTimestampToNanotime(int timestamp, long now) { in convertTimestampToNanotime() argument
63 if ((now - mPreviousNow) > (RANGE_NANOS / 2)) { in convertTimestampToNanotime()
65 long minimumTimeNanos = (now - mBaseHostTimeNanos) in convertTimestampToNanotime()
78 if (timestampHostNanos > now) { in convertTimestampToNanotime()
80 mBaseHostTimeNanos = now; in convertTimestampToNanotime()
81 timestampHostNanos = now; in convertTimestampToNanotime()
84 long windowBottom = now - mWindowNanos; in convertTimestampToNanotime()
[all …]
/aosp12/frameworks/base/services/core/java/com/android/server/wm/
H A DWindowOrientationListener.java702 final long now = event.timestamp; in onSensorChanged() local
706 if (now < then in onSensorChanged()
726 mLastFilteredTimestampNanos = now; in onSensorChanged()
761 if (isFlatLocked(now)) { in onSensorChanged()
763 mFlatTimestampNanos = now; in onSensorChanged()
767 mSwingTimestampNanos = now; in onSensorChanged()
988 if (now < mAccelerationTimestampNanos in isPredictedRotationAcceptableLocked()
1011 mPredictedRotationTimestampNanos = now; in updatePredictedRotationLocked()
1032 private boolean isFlatLocked(long now) { in isFlatLocked() argument
1068 private float remainingMS(long now, long until) { in remainingMS() argument
[all …]
/aosp12/system/core/healthd/
H A Dhealthd_mode_charger.cpp427 int64_t now = curr_time_ms(); in SetKeyCallback() local
437 if (down) keys_[code].timestamp = now; in SetKeyCallback()
470 if (now >= reboot_timeout) { in ProcessKey()
485 now); in ProcessKey()
513 ProcessKey(KEY_POWER, now); in HandleInputState()
565 int64_t now = curr_time_ms(); in Heartbeat() local
567 HandleInputState(now); in Heartbeat()
568 HandlePowerSupplyState(now); in Heartbeat()
573 UpdateScreenState(now); in Heartbeat()
592 int64_t now = curr_time_ms(); in PrepareToWait() local
[all …]
/aosp12/art/openjdkjvmti/
H A Dti_phase.cc105 DCHECK(now == JVMTI_PHASE_ONLOAD || in GetPhase()
106 now == JVMTI_PHASE_PRIMORDIAL || in GetPhase()
107 now == JVMTI_PHASE_START || in GetPhase()
108 now == JVMTI_PHASE_LIVE || in GetPhase()
109 now == JVMTI_PHASE_DEAD); in GetPhase()
110 *phase_ptr = now; in GetPhase()
116 DCHECK(now == JVMTI_PHASE_ONLOAD || in IsLivePhase()
118 now == JVMTI_PHASE_START || in IsLivePhase()
119 now == JVMTI_PHASE_LIVE || in IsLivePhase()
120 now == JVMTI_PHASE_DEAD); in IsLivePhase()
[all …]
/aosp12/system/logging/liblog/
H A Dlog_time.cpp26 time_t now; in strptime() local
29 now = tv_sec; in strptime()
31 time(&now); in strptime()
32 tv_sec = now; in strptime()
39 ptm = localtime_r(&now, &tmBuf); in strptime()
41 ptm = localtime(&now); in strptime()
75 now = tv_sec; in strptime()
77 ptm = localtime_r(&now, &tmBuf); in strptime()
79 ptm = localtime(&now); in strptime()
124 time(&now); in strptime()
[all …]
/aosp12/frameworks/native/services/surfaceflinger/Scheduler/
H A DVSyncDispatchTimerQueue.cpp218 mLastTimerSchedule = mTimeKeeper->now(); in setTimer()
221 void VSyncDispatchTimerQueue::rearmTimer(nsecs_t now) { in rearmTimer() argument
247 callback->update(mTracker, now); in rearmTimerSkippingUpdateFor()
259 mTraceBuffer.note(*nextWakeupName, *min - now, *targetVsync - now); in rearmTimerSkippingUpdateFor()
261 setTimer(*min, now); in rearmTimerSkippingUpdateFor()
278 auto const now = mTimeKeeper->now(); in timerCallback() local
279 mLastTimerCallback = now; in timerCallback()
298 rearmTimer(mTimeKeeper->now()); in timerCallback()
346 auto const now = mTimeKeeper->now(); in schedule() local
362 rearmTimerSkippingUpdateFor(now, it); in schedule()
[all …]
/aosp12/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/
H A 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()
109 wakeupEvent(iface, uids[5], v4, tcp, mac, srcIp, dstIp, sport, dport, now); in testWakeupEventLogging()
130 long ts = now + 10; in testWakeupEventLogging()
147 wakeupEvent(iface, uid, 0x800, 6, mac, srcIp, dstIp, 23, 24, now); in testWakeupEventLogging()
165 final long now = 1001L; in testWakeupStatsLogging() local
173 wakeupEvent("wlan0", 1000, v4, tcp, mac, srcIp, dstIp, sport, dport, now); in testWakeupStatsLogging()
175 wakeupEvent("wlan0", 1000, v4, udp, mac, srcIp, dstIp, sport, dport, now); in testWakeupStatsLogging()
182 wakeupEvent("wlan0", 0, v6, udp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupStatsLogging()
185 wakeupEvent("wlan0", 0, v6, udp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupStatsLogging()
[all …]
/aosp12/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/net/
H A DNetworkCycleDataLoaderTest.java120 final ZonedDateTime now = ZonedDateTime.now(); in loadPolicyData_shouldRecordUsageFromPolicyCycle() local
121 final Range<ZonedDateTime> cycle = new Range<>(now, now); in loadPolicyData_shouldRecordUsageFromPolicyCycle()
122 final long nowInMs = now.toInstant().toEpochMilli(); in loadPolicyData_shouldRecordUsageFromPolicyCycle()
144 final long now = System.currentTimeMillis(); in loadFourWeeksData_shouldRecordUsageForLast4Weeks() local
146 final long twoDaysAgo = now - (DateUtils.DAY_IN_MILLIS * 2); in loadFourWeeksData_shouldRecordUsageForLast4Weeks()
148 when(networkHistory.getEnd()).thenReturn(now); in loadFourWeeksData_shouldRecordUsageForLast4Weeks()
152 verify(mLoader).recordUsage(fourWeeksAgo, now); in loadFourWeeksData_shouldRecordUsageForLast4Weeks()
158 final long now = System.currentTimeMillis(); in loadDataForSpecificCycles_shouldRecordUsageForSpecifiedTime() local
159 final long tenDaysAgo = now - (DateUtils.DAY_IN_MILLIS * 10); in loadDataForSpecificCycles_shouldRecordUsageForSpecifiedTime()
163 cycles.add(now); in loadDataForSpecificCycles_shouldRecordUsageForSpecifiedTime()
[all …]
/aosp12/system/netd/libnetdutils/include/netdutils/
H A 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()
/aosp12/system/libbase/
H A Dchrono_utils_test.cpp32 struct timespec now; in GetBootTimeSeconds() local
33 clock_gettime(CLOCK_BOOTTIME, &now); in GetBootTimeSeconds()
35 auto now_tp = boot_clock::time_point(std::chrono::seconds(now.tv_sec) + in GetBootTimeSeconds()
36 std::chrono::nanoseconds(now.tv_nsec)); in GetBootTimeSeconds()
42 auto now = GetBootTimeSeconds(); in TEST() local
44 std::chrono::duration_cast<std::chrono::seconds>(boot_clock::now().time_since_epoch()); in TEST()
45 EXPECT_EQ(now, boot_seconds); in TEST()
57 auto start = boot_clock::now(); in TEST()
60 auto stop = boot_clock::now(); in TEST()
/aosp12/packages/modules/Wifi/service/java/com/android/server/wifi/
H A 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()
205 long timeSinceLastScreenOnMs = now - mLastScreenOnTimestampMs; in updateConnectionStats()
313 long now = mClock.getElapsedSinceBootMillis(); in resetOnNewConnection() local
314 mLastLinkProbeTimestampMs = now; in resetOnNewConnection()
315 mLastTxSuccessIncreaseTimestampMs = now; in resetOnNewConnection()
324 long now = mClock.getElapsedSinceBootMillis(); in updateConnectionStats() local
[all …]
/aosp12/packages/apps/DeskClock/tests/src/com/android/deskclock/uidata/
H A 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()
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()
106 assertEquals(86400000, PeriodicCallbackModel.getDelay(now + 3000, MIDNIGHT, 3000)); in getMidnightDelay()
[all …]
/aosp12/frameworks/base/services/core/java/com/android/server/notification/
H A DRateEstimator.java37 public float update(long now) { in update() argument
44 mInterarrivalTime = getInterarrivalEstimate(now); in update()
47 mLastEventTime = now; in update()
52 public float getRate(long now) { in getRate() argument
56 return (float) (1.0 / getInterarrivalEstimate(now)); in getRate()
60 private double getInterarrivalEstimate(long now) { in getInterarrivalEstimate() argument
61 double dt = ((double) (now - mLastEventTime)) / 1000.0; in getInterarrivalEstimate()
/aosp12/system/update_engine/update_manager/
H A Dreal_time_provider_unittest.cc64 const Time now = CurrTime(); in TEST_F() local
66 now.LocalExplode(&exploded); in TEST_F()
74 FakeSystemState::Get()->fake_clock()->SetWallclockTime(now); in TEST_F()
79 const Time now = CurrTime(); in TEST_F() local
81 now.LocalExplode(&expected); in TEST_F()
82 FakeSystemState::Get()->fake_clock()->SetWallclockTime(now); in TEST_F()
88 const Time now = CurrTime(); in TEST_F() local
90 now.LocalExplode(&expected); in TEST_F()
91 FakeSystemState::Get()->fake_clock()->SetWallclockTime(now); in TEST_F()
/aosp12/frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/
H A DServiceStateStats.java55 final long now = getTimeMillis(); in conclude() local
59 addServiceState(lastState, now); in conclude()
64 final long now = getTimeMillis(); in onImsVoiceRegistrationChanged() local
69 return new TimestampedServiceState(null, now); in onImsVoiceRegistrationChanged()
76 addServiceState(lastState, now); in onImsVoiceRegistrationChanged()
81 final long now = getTimeMillis(); in onServiceStateChanged() local
84 addServiceState(mLastState.getAndSet(new TimestampedServiceState(null, now)), now); in onServiceStateChanged() local
104 addServiceStateAndSwitch(prevState, now, null); in addServiceState()
109 long now, in addServiceStateAndSwitch() argument
115 if (now >= prevState.mTimestamp) { in addServiceStateAndSwitch()
[all …]

12345678910>>...59