Home
last modified time | relevance | path

Searched refs:SystemClock (Results 1 – 25 of 882) sorted by relevance

12345678910>>...36

/frameworks/base/services/core/java/com/android/server/am/
DBatteryStatsService.java60 import android.os.SystemClock;
180 timestampNanos = SystemClock.elapsedRealtimeNanos();
450 SystemClock.elapsedRealtime(), SystemClock.uptimeMillis())); in noteBinderCallStats()
508 SystemClock.elapsedRealtime(), SystemClock.uptimeMillis()); in initPowerManagement()
546 final long elapsedRealtime = SystemClock.elapsedRealtime(); in onLowPowerModeChanged()
547 final long uptime = SystemClock.uptimeMillis(); in onLowPowerModeChanged()
586 final long elapsedRealtime = SystemClock.elapsedRealtime(); in removeUid()
597 final long elapsedRealtime = SystemClock.elapsedRealtime(); in onCleanupUser()
618 final long elapsedRealtime = SystemClock.elapsedRealtime(); in addIsolatedUid()
619 final long uptime = SystemClock.uptimeMillis(); in addIsolatedUid()
[all …]
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/
DConnectivityManagerTestBase.java32 import android.os.SystemClock;
100 mLastConnectivityChangeTime = SystemClock.uptimeMillis(); in onReceive()
157 long startTime = SystemClock.uptimeMillis(); in waitForNetworkState()
164 if ((SystemClock.uptimeMillis() - startTime) > timeout) { in waitForNetworkState()
169 SystemClock.sleep(SHORT_TIMEOUT); in waitForNetworkState()
176 long startTime = SystemClock.uptimeMillis(); in waitForWifiState()
183 if ((SystemClock.uptimeMillis() - startTime) > timeout) { in waitForWifiState()
188 SystemClock.sleep(SHORT_TIMEOUT); in waitForWifiState()
195 long startTime = SystemClock.uptimeMillis(); in waitForWifiApState()
202 if ((SystemClock.uptimeMillis() - startTime) > timeout) { in waitForWifiApState()
[all …]
/frameworks/base/core/java/android/speech/tts/
DAbstractEventLogger.java18 import android.os.SystemClock;
44 mReceivedTime = SystemClock.elapsedRealtime(); in AbstractEventLogger()
53 mRequestProcessingStartTime = SystemClock.elapsedRealtime(); in onRequestProcessingStart()
62 mEngineStartTime = SystemClock.elapsedRealtime(); in onEngineDataReceived()
71 mEngineCompleteTime = SystemClock.elapsedRealtime(); in onEngineComplete()
84 mPlaybackStartTime = SystemClock.elapsedRealtime(); in onAudioDataWritten()
99 long completionTime = SystemClock.elapsedRealtime(); in onCompleted()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/time/
DSystemClockImpl.java22 public class SystemClockImpl implements SystemClock {
28 return android.os.SystemClock.uptimeMillis(); in uptimeMillis()
33 return android.os.SystemClock.elapsedRealtime(); in elapsedRealtime()
38 return android.os.SystemClock.elapsedRealtimeNanos(); in elapsedRealtimeNanos()
43 return android.os.SystemClock.currentThreadTimeMillis(); in currentThreadTimeMillis()
/frameworks/base/tests/notification/src/com/android/frameworks/tests/notification/
DNotificationTests.java32 import android.os.SystemClock;
256 final long time = SystemClock.currentThreadTimeMillis(); in testCreate()
258 L(" %s: create=%dms", summarize(n), SystemClock.currentThreadTimeMillis() - time); in testCreate()
273 final long time = SystemClock.currentThreadTimeMillis(); in testCreate()
290 … L(" %s: create=%dms", phoneCall.toString(), SystemClock.currentThreadTimeMillis() - time); in testCreate()
295 final long time = SystemClock.currentThreadTimeMillis(); in testCreate()
303 L(" %s: create=%dms", summarize(n), SystemClock.currentThreadTimeMillis() - time); in testCreate()
308 final long time = SystemClock.currentThreadTimeMillis(); in testCreate()
324 L(" %s: create=%dms", summarize(n), SystemClock.currentThreadTimeMillis() - time); in testCreate()
331 final long time = SystemClock.currentThreadTimeMillis(); in testCreate()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/inputmethod/
DCompletableFutureUtilTest.kt21 import android.os.SystemClock
71 val beginNanos = SystemClock.elapsedRealtimeNanos() in assertCompletionTiming()
75 val elapsedNanos = SystemClock.elapsedRealtimeNanos() - beginNanos in assertCompletionTiming()
90 val beginNanos = SystemClock.elapsedRealtimeNanos() in testCharSequenceTimedOut()
93 val elapsed = SystemClock.elapsedRealtimeNanos() - beginNanos in testCharSequenceTimedOut()
114 beginNanosRef.set(SystemClock.elapsedRealtimeNanos()) in testCharSequenceTimedOutWithInterruption()
117 endNanosRef.set(SystemClock.elapsedRealtimeNanos()) in testCharSequenceTimedOutWithInterruption()
140 val beginNanos = SystemClock.elapsedRealtimeNanos() in testCharSequenceAfterCompletion()
144 val elapsed = SystemClock.elapsedRealtimeNanos() - beginNanos in testCharSequenceAfterCompletion()
158 val beginNanos = SystemClock.elapsedRealtimeNanos() in testCharSequenceAfterError()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBatteryStatsSamplingTimerTest.java21 import android.os.SystemClock;
40 timer.update(10, 1, SystemClock.elapsedRealtime() * 1000); in testSettingStalePreservesData()
42 timer.update(20, 2, SystemClock.elapsedRealtime() * 1000); in testSettingStalePreservesData()
66 timer.update(10, 1, SystemClock.elapsedRealtime() * 1000); in testEndSampleAndContinueWhenTimeOrCountDecreases()
75 timer.update(0, 0, SystemClock.elapsedRealtime() * 1000); in testEndSampleAndContinueWhenTimeOrCountDecreases()
78 timer.update(0, 0, SystemClock.elapsedRealtime() * 1000); in testEndSampleAndContinueWhenTimeOrCountDecreases()
92 timer.update(30, 3, SystemClock.elapsedRealtime() * 1000); in testEndSampleAndContinueWhenTimeOrCountDecreases()
95 timer.update(30, 3, SystemClock.elapsedRealtime() * 1000); in testEndSampleAndContinueWhenTimeOrCountDecreases()
117 timer.update(10, 1, SystemClock.elapsedRealtime() * 1000); in testFirstUpdateIsAbsorbed()
126 timer.update(10, 1, SystemClock.elapsedRealtime() * 1000); in testFirstUpdateIsAbsorbed()
[all …]
/frameworks/base/cmds/uiautomator/library/core-src/com/android/uiautomator/core/
DInteractionController.java24 import android.os.SystemClock;
189 final long eventTime = SystemClock.uptimeMillis(); in sendKeyAndWaitForEvent()
217 SystemClock.sleep(REGULAR_CLICK_LENGTH); in clickNoSync()
274 SystemClock.sleep(REGULAR_CLICK_LENGTH); in clickRunnable()
294 SystemClock.sleep(mUiAutomatorBridge.getSystemLongPressTime());
306 mDownTime = SystemClock.uptimeMillis();
317 final long eventTime = SystemClock.uptimeMillis();
329 final long eventTime = SystemClock.uptimeMillis();
452 SystemClock.sleep(mUiAutomatorBridge.getSystemLongPressTime());
461 SystemClock.sleep(MOTION_EVENT_INJECTION_DELAY_MILLIS);
[all …]
/frameworks/base/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/
DWaitUtils.kt20 import android.os.SystemClock
36 val startTime = SystemClock.uptimeMillis()
42 SystemClock.sleep(interval)
43 } while (SystemClock.uptimeMillis() - startTime < timeout)
/frameworks/base/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/helpers/
DSplitScreenHelper.kt21 import android.os.SystemClock
97 SystemClock.sleep(TIMEOUT_MS) in getPrimary()
117 val downTime = SystemClock.uptimeMillis() in getPrimary()
125 instrumentation, downTime, SystemClock.uptimeMillis(), in getPrimary()
129 instrumentation, downTime, SystemClock.uptimeMillis(), in getPrimary()
133 SystemClock.sleep(TIMEOUT_MS) in getPrimary()
135 instrumentation, MotionEvent.ACTION_UP, downTime, SystemClock.uptimeMillis(), in getPrimary()
138 SystemClock.sleep(TIMEOUT_MS) in getPrimary()
155 SystemClock.sleep(duration) in touch()
189 SystemClock.sleep(GESTURE_STEP_MS) in touchMove()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/leak/
DReferenceTestUtils.java19 import android.os.SystemClock;
53 long deadline = SystemClock.uptimeMillis() + 5_000; in waitForCondition()
55 if (SystemClock.uptimeMillis() > deadline) { in waitForCondition()
58 SystemClock.sleep(100); in waitForCondition()
/frameworks/base/test-runner/src/android/test/
DTouchUtils.java26 import android.os.SystemClock;
276 long downTime = SystemClock.uptimeMillis(); in tapView()
277 long eventTime = SystemClock.uptimeMillis(); in tapView()
284 eventTime = SystemClock.uptimeMillis(); in tapView()
291 eventTime = SystemClock.uptimeMillis(); in tapView()
316 long downTime = SystemClock.uptimeMillis(); in touchAndCancelView()
317 long eventTime = SystemClock.uptimeMillis(); in touchAndCancelView()
324 eventTime = SystemClock.uptimeMillis(); in touchAndCancelView()
351 long downTime = SystemClock.uptimeMillis(); in clickView()
352 long eventTime = SystemClock.uptimeMillis(); in clickView()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DAbstractStatsBase.java20 import android.os.SystemClock;
65 mLastTimeWritten.set(SystemClock.elapsedRealtime()); in writeNow()
69 if (SystemClock.elapsedRealtime() - mLastTimeWritten.get() < WRITE_INTERVAL_MS in maybeWriteAsync()
80 mLastTimeWritten.set(SystemClock.elapsedRealtime()); in maybeWriteAsync()
122 mLastTimeWritten.set(SystemClock.elapsedRealtime()); in read()
/frameworks/base/core/java/android/os/
DCountDownTimer.java107 mStopTimeInFuture = SystemClock.elapsedRealtime() + mMillisInFuture; in start()
139 final long millisLeft = mStopTimeInFuture - SystemClock.elapsedRealtime();
144 long lastTickStart = SystemClock.elapsedRealtime();
148 long lastTickDuration = SystemClock.elapsedRealtime() - lastTickStart;
/frameworks/base/services/tests/servicestests/src/com/android/server/power/
DAttentionDetectorTest.java44 import android.os.SystemClock;
87 mNextDimming = SystemClock.uptimeMillis() + 3000L; in setUp()
162 int result = mAttentionDetector.onUserActivity(SystemClock.uptimeMillis(), i); in onUserActivity_ignoresWhiteListedActivityTypes()
173 long now = SystemClock.uptimeMillis(); in testUpdateUserActivity_ignoresWhenItsNotTimeYet()
182 long now = SystemClock.uptimeMillis(); in testUpdateUserActivity_schedulesTheNextCheck()
192 long now = SystemClock.uptimeMillis(); in testOnUserActivity_ignoresAfterMaximumExtension()
236 SystemClock.uptimeMillis()); in testCallbackOnSuccess_ignoresIfNoAttention()
244 SystemClock.uptimeMillis()); in testCallbackOnSuccess_callsCallback()
255 SystemClock.uptimeMillis()); in testCallbackOnSuccess_doesNotCallNonCurrentCallback()
266 SystemClock.uptimeMillis()); // old callback came in testCallbackOnSuccess_callsCallbackAfterOldCallbackCame()
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DPersisterQueueTests.java27 import android.os.SystemClock;
94 final long dispatchTime = SystemClock.uptimeMillis(); in testProcessOneItem()
99 final long processDuration = SystemClock.uptimeMillis() - dispatchTime; in testProcessOneItem()
118 final long dispatchTime = SystemClock.uptimeMillis(); in testProcessOneItem_Flush()
123 final long processDuration = SystemClock.uptimeMillis() - dispatchTime; in testProcessOneItem_Flush()
142 final long dispatchTime = SystemClock.uptimeMillis(); in testProcessTwoItems()
149 final long processDuration = SystemClock.uptimeMillis() - dispatchTime; in testProcessTwoItems()
170 long dispatchTime = SystemClock.uptimeMillis(); in testProcessTwoItems_OneAfterAnother()
174 long processDuration = SystemClock.uptimeMillis() - dispatchTime; in testProcessTwoItems_OneAfterAnother()
186 dispatchTime = SystemClock.uptimeMillis(); in testProcessTwoItems_OneAfterAnother()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/uicc/
DIccRecordsTest.java46 import android.os.SystemClock;
157 startTime = SystemClock.elapsedRealtime(); in testGetIccSimChallengeResponseNull()
161 timeSpent = SystemClock.elapsedRealtime() - startTime; in testGetIccSimChallengeResponseNull()
177 startTime = SystemClock.elapsedRealtime(); in testGetIccSimChallengeResponseTimeout()
181 timeSpent = SystemClock.elapsedRealtime() - startTime; in testGetIccSimChallengeResponseTimeout()
218 startTime = SystemClock.elapsedRealtime(); in testGetIccSimChallengeResponseDefault()
222 timeSpent = SystemClock.elapsedRealtime() - startTime; in testGetIccSimChallengeResponseDefault()
228 startTime = SystemClock.elapsedRealtime(); in testGetIccSimChallengeResponseDefault()
231 timeSpent = SystemClock.elapsedRealtime() - startTime; in testGetIccSimChallengeResponseDefault()
236 startTime = SystemClock.elapsedRealtime(); in testGetIccSimChallengeResponseDefault()
[all …]
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/
DWifiStressTest.java30 import android.os.SystemClock;
158 start = SystemClock.uptimeMillis(); in testWifiScanning()
165 scanTimeSum += SystemClock.uptimeMillis() - start; in testWifiScanning()
233 long start = SystemClock.uptimeMillis(); in testWifiReconnectionAfterSleep()
237 ((SystemClock.uptimeMillis() - start) < SCREEN_OFF_TIMER)) { in testWifiReconnectionAfterSleep()
238 SystemClock.sleep(100); in testWifiReconnectionAfterSleep()
242 SystemClock.sleep(WIFI_IDLE_MS + WIFI_SHUTDOWN_DELAY); in testWifiReconnectionAfterSleep()
256 SystemClock.sleep(mWifiSleepTime); in testWifiReconnectionAfterSleep()
273 long startTime = SystemClock.uptimeMillis(); in testWifiReconnectionAfterSleep()
279 long connectionTime = SystemClock.uptimeMillis() - startTime; in testWifiReconnectionAfterSleep()
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
DSettingsProviderPerformanceTest.java22 import android.os.SystemClock;
45 final long startTimeMicro = SystemClock.currentTimeMicro(); in testSetAndGetPerformanceForGlobalViaFrontEndApi()
72 final long elapsedTimeMicro = SystemClock.currentTimeMicro() - startTimeMicro; in testSetAndGetPerformanceForGlobalViaFrontEndApi()
89 final long startTimeMicro = SystemClock.currentTimeMicro(); in testSetAndGetPerformanceForGlobalViaProviderApi()
116 final long elapsedTimeMicro = SystemClock.currentTimeMicro() - startTimeMicro; in testSetAndGetPerformanceForGlobalViaProviderApi()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/
DVisibilityLoggerMixin.java23 import android.os.SystemClock;
53 mCreationTimestamp = SystemClock.elapsedRealtime(); in onAttach()
61 mVisibleTimestamp = SystemClock.elapsedRealtime(); in onResume()
76 final int elapse = (int) (SystemClock.elapsedRealtime() - mVisibleTimestamp); in onPause()
91 final int elapse = (int) (SystemClock.elapsedRealtime() - mCreationTimestamp); in writeElapsedTimeMetric()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/leak/
DTrackedCollections.java19 import android.os.SystemClock;
51 collectionState.startUptime = SystemClock.uptimeMillis(); in track()
55 && SystemClock.uptimeMillis() - collectionState.startUptime > HALFWAY_DELAY) { in track()
59 collectionState.lastUptime = SystemClock.uptimeMillis(); in track()
81 long now = SystemClock.uptimeMillis(); in dump()
/frameworks/base/core/java/com/android/internal/os/
DClock.java19 import android.os.SystemClock;
44 return SystemClock.elapsedRealtime();
49 return SystemClock.uptimeMillis();
/frameworks/base/tests/UsageStatsPerfTests/src/com/android/frameworks/perftests/usage/tests/
DUsageStatsDatabasePerfTest.java24 import android.os.SystemClock;
123 final long startTime = SystemClock.elapsedRealtimeNanos(); in runQueryUsageStatsTest()
126 final long endTime = SystemClock.elapsedRealtimeNanos(); in runQueryUsageStatsTest()
138 final long startTime = SystemClock.elapsedRealtimeNanos(); in runPutUsageStatsTest()
140 final long endTime = SystemClock.elapsedRealtimeNanos(); in runPutUsageStatsTest()
152 final long startTime = SystemClock.elapsedRealtimeNanos(); in runObfuscateStatsTest()
155 final long endTime = SystemClock.elapsedRealtimeNanos(); in runObfuscateStatsTest()
169 final long startTime = SystemClock.elapsedRealtimeNanos(); in runDeobfuscateStatsTest()
171 final long endTime = SystemClock.elapsedRealtimeNanos(); in runDeobfuscateStatsTest()
/frameworks/base/services/core/java/com/android/server/vibrator/
DAbstractVibratorStep.java19 import android.os.SystemClock;
76 return isSameVibrator && (previousStepVibratorOffTimeout > SystemClock.uptimeMillis()); in acceptVibratorCompleteCallback()
81 return Arrays.asList(new CompleteEffectVibratorStep(conductor, SystemClock.uptimeMillis(), in cancel()
87 if (previousStepVibratorOffTimeout > SystemClock.uptimeMillis()) { in cancelImmediately()
131 long nextStartTime = SystemClock.uptimeMillis() + mVibratorOnResult; in nextSteps()
/frameworks/base/apct-tests/perftests/windowmanager/src/android/wm/
DRecentsAnimationPerfTest.java35 import android.os.SystemClock;
142 SystemClock.sleep(intervalBetweenOperations); in makeInterval()
190 long startTime = SystemClock.elapsedRealtimeNanos(); in testRecentsAnimation()
192 final long elapsedTimeNsOfFinish = SystemClock.elapsedRealtimeNanos() - startTime; in testRecentsAnimation()
199 startTime = SystemClock.elapsedRealtimeNanos(); in testRecentsAnimation()
201 final long elapsedTimeNs = SystemClock.elapsedRealtimeNanos() - startTime; in testRecentsAnimation()
229 final long startTime = SystemClock.elapsedRealtimeNanos(); in testRecentsAnimation()
231 final long elapsedTimeNsOfStart = SystemClock.elapsedRealtimeNanos() - startTime; in testRecentsAnimation()

12345678910>>...36