Home
last modified time | relevance | path

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

12345678910>>...12

/frameworks/base/core/java/android/view/
DWindowOrientationListener.java395 final long now = event.timestamp; in onSensorChanged() local
397 final float timeDeltaMS = (now - then) * 0.000001f; in onSensorChanged()
399 if (now < then in onSensorChanged()
400 || now > then + MAX_FILTER_DELTA_TIME_NANOS in onSensorChanged()
419 mLastFilteredTimestampNanos = now; in onSensorChanged()
439 mAccelerationTimestampNanos = now; in onSensorChanged()
450 addTiltHistoryEntry(now, tiltAngle); in onSensorChanged()
453 if (isFlat(now)) { in onSensorChanged()
455 mFlatTimestampNanos = now; in onSensorChanged()
457 if (isSwinging(now, tiltAngle)) { in onSensorChanged()
[all …]
DChoreographer.java311 final long now = SystemClock.uptimeMillis(); in postCallbackDelayedInternal() local
312 final long dueTime = now + delayMillis; in postCallbackDelayedInternal()
315 if (dueTime <= now) { in postCallbackDelayedInternal()
316 scheduleFrameLocked(now); in postCallbackDelayedInternal()
460 private void scheduleFrameLocked(long now) { in scheduleFrameLocked() argument
480 mLastFrameTimeNanos / NANOS_PER_MS + sFrameDelay, now); in scheduleFrameLocked()
482 Log.d(TAG, "Scheduling next frame in " + (nextFrameTime - now) + " ms."); in scheduleFrameLocked()
548 final long now = SystemClock.uptimeMillis(); in doCallbacks() local
549 callbacks = mCallbackQueues[callbackType].extractDueCallbacksLocked(now); in doCallbacks()
587 final long now = SystemClock.uptimeMillis(); in doScheduleCallback() local
[all …]
/frameworks/support/volley/tests/src/com/android/volley/toolbox/
DHttpHeaderParserTest.java68 long now = System.currentTimeMillis(); in testParseCacheHeaders_normalExpire() local
69 headers.put("Date", rfc1123Date(now)); in testParseCacheHeaders_normalExpire()
70 headers.put("Expires", rfc1123Date(now + ONE_HOUR_MILLIS)); in testParseCacheHeaders_normalExpire()
76 assertEqualsWithin(entry.serverDate, now, ONE_MINUTE_MILLIS); in testParseCacheHeaders_normalExpire()
77 assertTrue(entry.softTtl >= (now + ONE_HOUR_MILLIS)); in testParseCacheHeaders_normalExpire()
82 long now = System.currentTimeMillis(); in testParseCacheHeaders_expiresInPast() local
83 headers.put("Date", rfc1123Date(now)); in testParseCacheHeaders_expiresInPast()
84 headers.put("Expires", rfc1123Date(now - ONE_HOUR_MILLIS)); in testParseCacheHeaders_expiresInPast()
90 assertEqualsWithin(entry.serverDate, now, ONE_MINUTE_MILLIS); in testParseCacheHeaders_expiresInPast()
97 long now = System.currentTimeMillis(); in testParseCacheHeaders_serverRelative() local
[all …]
/frameworks/native/opengl/tests/finish/
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()
111 printf("glFinish() time = %llu us\n", (t-now)/1000); in main()
121 now = systemTime(); in main()
125 printf("glFinish() time = %llu us\n", (t-now)/1000); in main()
135 now = systemTime(); in main()
140 printf("glFinish() time = %llu us\n", (t-now)/1000); in main()
150 now = systemTime(); in main()
[all …]
/frameworks/base/cmds/input/src/com/android/commands/input/
DInput.java162 long now = SystemClock.uptimeMillis(); in sendKeyEvent() local
163 injectKeyEvent(new KeyEvent(now, now, KeyEvent.ACTION_DOWN, keyCode, 0, 0, in sendKeyEvent()
165 injectKeyEvent(new KeyEvent(now, now, KeyEvent.ACTION_UP, keyCode, 0, 0, in sendKeyEvent()
170 long now = SystemClock.uptimeMillis(); in sendTap() local
171 injectMotionEvent(inputSource, MotionEvent.ACTION_DOWN, now, x, y, 1.0f); in sendTap()
172 injectMotionEvent(inputSource, MotionEvent.ACTION_UP, now, x, y, 0.0f); in sendTap()
177 long now = SystemClock.uptimeMillis(); in sendSwipe() local
178 injectMotionEvent(inputSource, MotionEvent.ACTION_DOWN, now, x1, y1, 1.0f); in sendSwipe()
181 injectMotionEvent(inputSource, MotionEvent.ACTION_MOVE, now, lerp(x1, x2, alpha), in sendSwipe()
184 injectMotionEvent(inputSource, MotionEvent.ACTION_UP, now, x1, y1, 0.0f); in sendSwipe()
[all …]
/frameworks/base/core/tests/coretests/src/android/provider/
DSmsProviderTest.java38 long now = System.currentTimeMillis(); in testProvider() local
46 Long.toString(now - (5 * 24 * 60 * 60 * 1000)), in testProvider()
47 Long.toString(now - (2 * 24 * 60 * 60 * 1000)), in testProvider()
48 Long.toString(now - (5 * 60 * 60 * 1000)), in testProvider()
49 Long.toString(now - (30 * 60 * 1000)), in testProvider()
50 Long.toString(now - (5 * 60 * 1000)), in testProvider()
51 Long.toString(now) in testProvider()
/frameworks/base/core/java/android/os/
DConditionVariable.java124 long now = System.currentTimeMillis(); in block() local
125 long end = now + timeout; in block()
126 while (!mCondition && now < end) { in block()
128 this.wait(end-now); in block()
132 now = System.currentTimeMillis(); in block()
/frameworks/base/core/java/android/util/
DTimingLogger.java124 long now = SystemClock.elapsedRealtime(); in addSplit() local
125 mSplits.add(now); in addSplit()
138 long now = first; in dumpToLog() local
140 now = mSplits.get(i); in dumpToLog()
144 Log.d(mTag, mLabel + ": " + (now - prev) + " ms, " + splitLabel); in dumpToLog()
146 Log.d(mTag, mLabel + ": end, " + (now - first) + " ms"); in dumpToLog()
/frameworks/base/core/java/android/net/
DNetworkPolicyManager.java161 final Time now = new Time(policy.cycleTimezone); in computeLastCycleBoundary() local
162 now.set(currentTime); in computeLastCycleBoundary()
165 final Time cycle = new Time(now); in computeLastCycleBoundary()
169 if (Time.compare(cycle, now) >= 0) { in computeLastCycleBoundary()
172 final Time lastMonth = new Time(now); in computeLastCycleBoundary()
191 final Time now = new Time(policy.cycleTimezone); in computeNextCycleBoundary() local
192 now.set(currentTime); in computeNextCycleBoundary()
195 final Time cycle = new Time(now); in computeNextCycleBoundary()
199 if (Time.compare(cycle, now) <= 0) { in computeNextCycleBoundary()
202 final Time nextMonth = new Time(now); in computeNextCycleBoundary()
/frameworks/base/services/java/com/android/server/
DWatchdog.java248 long now; in checkReboot() local
251 now = System.currentTimeMillis(); in checkReboot()
252 realStartTime = computeCalendarTime(mCalendar, now, in checkReboot()
257 (now-mBootTime) >= (rebootIntervalMillis-rebootWindowMillis)) { in checkReboot()
260 EventLog.writeEvent(EventLogTags.WATCHDOG_SCHEDULED_REBOOT, now, in checkReboot()
268 if (now < realStartTime) { in checkReboot()
271 now, rebootStartTime); in checkReboot()
272 } else if (now < (realStartTime+rebootWindowMillis)) { in checkReboot()
273 String doit = shouldWeBeBrutalLocked(now); in checkReboot()
274 EventLog.writeEvent(EventLogTags.WATCHDOG_SCHEDULED_REBOOT, now, in checkReboot()
[all …]
DTwilightService.java471 final long now = System.currentTimeMillis(); in updateTwilightState() local
474 mTwilightCalculator.calculateTwilight(now - DateUtils.DAY_IN_MILLIS, in updateTwilightState()
479 mTwilightCalculator.calculateTwilight(now, in updateTwilightState()
486 mTwilightCalculator.calculateTwilight(now + DateUtils.DAY_IN_MILLIS, in updateTwilightState()
502 nextUpdate = now + 12 * DateUtils.HOUR_IN_MILLIS; in updateTwilightState()
507 if (now > todaySunset) { in updateTwilightState()
509 } else if (now > todaySunrise) { in updateTwilightState()
517 Slog.d(TAG, "Next update in " + (nextUpdate - now) + " ms"); in updateTwilightState()
DAlarmManagerService.java522 final long now = System.currentTimeMillis(); in dump() local
526 pw.print(sdf.format(new Date(now))); pw.println("):"); in dump()
528 dumpAlarmList(pw, mRtcWakeupAlarms, " ", "RTC_WAKEUP", now); in dump()
531 dumpAlarmList(pw, mRtcAlarms, " ", "RTC", now); in dump()
535 final long now = SystemClock.elapsedRealtime(); in dump() local
538 TimeUtils.formatDuration(now, pw); pw.println("):"); in dump()
540 dumpAlarmList(pw, mElapsedRealtimeWakeupAlarms, " ", "ELAPSED_WAKEUP", now); in dump()
543 dumpAlarmList(pw, mElapsedRealtimeAlarms, " ", "ELAPSED", now); in dump()
650 String prefix, String label, long now) { in dumpAlarmList() argument
655 a.dump(pw, prefix + " ", now); in dumpAlarmList()
[all …]
/frameworks/base/core/tests/coretests/src/android/os/
DTestHandlerThread.java39 long now = System.currentTimeMillis(); in doTest() local
40 long endTime = now + timeout; in doTest()
41 while (!mDone && now < endTime) { in doTest()
43 wait(endTime-now); in doTest()
47 now = System.currentTimeMillis(); in doTest()
DMessageQueueTest.java69 long now = SystemClock.uptimeMillis() + 200; in testMessageOrder()
72 mHandler.sendMessageAtTime(mHandler.obtainMessage(2), now + 1); in testMessageOrder()
73 mHandler.sendMessageAtTime(mHandler.obtainMessage(3), now + 2); in testMessageOrder()
74 mHandler.sendMessageAtTime(mHandler.obtainMessage(4), now + 2); in testMessageOrder()
75 mHandler.sendMessageAtTime(mHandler.obtainMessage(0), now + 0); in testMessageOrder()
76 mHandler.sendMessageAtTime(mHandler.obtainMessage(1), now + 0); in testMessageOrder()
88 long now = SystemClock.uptimeMillis() + 200; in testAtFrontOfQueue()
91 mHandler.sendMessageAtTime(mHandler.obtainMessage(3), now); in testAtFrontOfQueue()
/frameworks/base/core/java/android/net/http/
DTimer.java35 long now = SystemClock.uptimeMillis(); in mark() local
37 HttpLog.v(message + " " + (now - mLast) + " total " + (now - mStart)); in mark()
39 mLast = now; in mark()
/frameworks/base/core/java/android/content/
DSyncContext.java55 final long now = SystemClock.elapsedRealtime(); in updateHeartbeat() local
56 if (now < mLastHeartbeatSendTime + HEARTBEAT_SEND_INTERVAL_IN_MS) return; in updateHeartbeat()
58 mLastHeartbeatSendTime = now; in updateHeartbeat()
/frameworks/base/voip/java/com/android/server/sip/
DSipWakeupTimer.java127 long now = SystemClock.elapsedRealtime(); in insertEvent() local
129 event.mTriggerTime = now + event.mPeriod; in insertEvent()
138 interval -= (int) (firstEvent.mTriggerTime - now); in insertEvent()
143 long triggerTime = now + event.mPeriod; in insertEvent()
165 long now = SystemClock.elapsedRealtime(); in set() local
166 MyEvent event = new MyEvent(period, callback, now); in set()
177 + showTime(triggerTime) + " at " + showTime(now) in set()
305 MyEvent(int period, Runnable callback, long now) { in MyEvent() argument
308 mLastTriggerTime = now; in MyEvent()
/frameworks/native/libs/utils/
DLooper.cpp200 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); in pollInner() local
201 int messageTimeoutMillis = toMillisecondTimeoutDelay(now, mNextMessageUptime); in pollInner()
208 this, mNextMessageUptime - now, timeoutMillis); in pollInner()
276 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); in pollInner() local
278 if (messageEnvelope.uptime <= now) { in pollInner()
351 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); in pollAll() local
352 timeoutMillis = toMillisecondTimeoutDelay(now, endTime); in pollAll()
482 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); in sendMessage() local
483 sendMessageAtTime(now, handler, message); in sendMessage()
488 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); in sendMessageDelayed() local
[all …]
/frameworks/base/core/java/com/android/internal/view/
DBaseSurfaceHolder.java199 long now = SystemClock.uptimeMillis(); in internalLockCanvas() local
201 if (nextTime > now) { in internalLockCanvas()
203 Thread.sleep(nextTime-now); in internalLockCanvas()
206 now = SystemClock.uptimeMillis(); in internalLockCanvas()
208 mLastLockTime = now; in internalLockCanvas()
/frameworks/base/services/java/com/android/server/wm/
DScreenRotationAnimation.java685 private boolean stepAnimation(long now) { in stepAnimation() argument
686 if (now > mHalfwayPoint) { in stepAnimation()
691 mFinishAnimStartTime = now; in stepAnimation()
697 … mMoreStartExit = mStartExitAnimation.getTransformation(now, mStartExitTransformation); in stepAnimation()
703 … mMoreStartEnter = mStartEnterAnimation.getTransformation(now, mStartEnterTransformation); in stepAnimation()
710 … mMoreStartFrame = mStartFrameAnimation.getTransformation(now, mStartFrameTransformation); in stepAnimation()
715 long finishNow = mFinishAnimReady ? (now - mFinishAnimStartTime) : 0; in stepAnimation()
741 … mMoreRotateExit = mRotateExitAnimation.getTransformation(now, mRotateExitTransformation); in stepAnimation()
747 … mMoreRotateEnter = mRotateEnterAnimation.getTransformation(now, mRotateEnterTransformation); in stepAnimation()
754 … mMoreRotateFrame = mRotateFrameAnimation.getTransformation(now, mRotateFrameTransformation); in stepAnimation()
[all …]
/frameworks/base/services/java/com/android/server/am/
DServiceRecord.java161 void dumpStartList(PrintWriter pw, String prefix, List<StartItem> list, long now) { in dumpStartList() argument
167 if (now != 0) { in dumpStartList()
169 TimeUtils.formatDuration(si.deliveredTime, now, pw); in dumpStartList()
207 long now = SystemClock.uptimeMillis(); in dump() local
226 TimeUtils.formatDuration(lastActivity, now, pw); in dump()
229 TimeUtils.formatDuration(executingStart, now, pw); in dump()
231 TimeUtils.formatDuration(restartTime, now, pw); in dump()
244 TimeUtils.formatDuration(restartDelay, now, pw); in dump()
246 TimeUtils.formatDuration(nextRestartTime, now, pw); in dump()
251 dumpStartList(pw, prefix, deliveredStarts, now); in dump()
/frameworks/base/core/java/android/widget/
DDigitalClock.java91 long now = SystemClock.uptimeMillis(); in onAttachedToWindow()
92 long next = now + (1000 - now % 1000); in onAttachedToWindow()
/frameworks/native/libs/ui/
DGraphicBufferAllocator.cpp170 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); in waitForLiberationLocked() local
171 nsecs_t timeToStop = now + timeout; in waitForLiberationLocked()
172 while (!sThread->mQueue.isEmpty() && now < timeToStop) { in waitForLiberationLocked()
173 sThread->mFreedCondition.waitRelative(sMutex, timeToStop - now); in waitForLiberationLocked()
174 now = systemTime(SYSTEM_TIME_MONOTONIC); in waitForLiberationLocked()
/frameworks/base/graphics/java/android/graphics/drawable/
DDrawableContainer.java289 final long now = SystemClock.uptimeMillis(); in selectDrawable() local
301 mExitAnimationEnd = now + mDrawableContainerState.mExitFadeDuration; in selectDrawable()
317 mEnterAnimationEnd = now + mDrawableContainerState.mEnterFadeDuration; in selectDrawable()
354 final long now = SystemClock.uptimeMillis(); in animate() local
358 if (mEnterAnimationEnd <= now) { in animate()
362 int animAlpha = (int)((mEnterAnimationEnd-now)*255) in animate()
374 if (mExitAnimationEnd <= now) { in animate()
379 int animAlpha = (int)((mExitAnimationEnd-now)*255) in animate()
391 scheduleSelf(mAnimationRunnable, now + 1000/60); in animate()
/frameworks/support/volley/src/com/android/volley/toolbox/
DHttpHeaderParser.java40 long now = System.currentTimeMillis(); in parseCacheHeaders() local
87 softExpire = now + maxAge * 1000; in parseCacheHeaders()
90 softExpire = now + (serverExpires - serverDate); in parseCacheHeaders()

12345678910>>...12