Searched refs:now (Results 1 - 25 of 171) sorted by relevance

1234567

/frameworks/base/core/java/android/net/http/
H A DTimer.java35 long now = SystemClock.uptimeMillis();
37 HttpLog.v(message + " " + (now - mLast) + " total " + (now - mStart));
39 mLast = now;
/frameworks/base/core/java/android/os/
H A DConditionVariable.java124 long now = System.currentTimeMillis();
125 long end = now + timeout;
126 while (!mCondition && now < end) {
128 this.wait(end-now);
132 now = System.currentTimeMillis();
/frameworks/base/libs/hwui/renderthread/
H A DTimeLord.cpp37 nsecs_t now = systemTime(CLOCK_MONOTONIC); local
38 nsecs_t jitterNanos = now - mFrameTimeNanos;
41 mFrameTimeNanos = now - lastFrameOffset;
/frameworks/base/core/java/android/util/
H A DTimingLogger.java124 long now = SystemClock.elapsedRealtime();
125 mSplits.add(now);
138 long now = first;
140 now = mSplits.get(i);
144 Log.d(mTag, mLabel + ": " + (now - prev) + " ms, " + splitLabel);
146 Log.d(mTag, mLabel + ": end, " + (now - first) + " ms");
/frameworks/volley/tests/src/com/android/volley/toolbox/
H A DHttpHeaderParserTest.java79 long now = System.currentTimeMillis();
80 headers.put("Date", rfc1123Date(now));
81 headers.put("Expires", rfc1123Date(now + ONE_HOUR_MILLIS));
87 assertEqualsWithin(entry.serverDate, now, ONE_MINUTE_MILLIS);
88 assertTrue(entry.softTtl >= (now + ONE_HOUR_MILLIS));
93 long now = System.currentTimeMillis();
94 headers.put("Date", rfc1123Date(now));
95 headers.put("Expires", rfc1123Date(now - ONE_HOUR_MILLIS));
101 assertEqualsWithin(entry.serverDate, now, ONE_MINUTE_MILLIS);
108 long now
[all...]
/frameworks/base/core/tests/coretests/src/android/provider/
H A DSmsProviderTest.java38 long now = System.currentTimeMillis();
46 Long.toString(now - (5 * 24 * 60 * 60 * 1000)),
47 Long.toString(now - (2 * 24 * 60 * 60 * 1000)),
48 Long.toString(now - (5 * 60 * 60 * 1000)),
49 Long.toString(now - (30 * 60 * 1000)),
50 Long.toString(now - (5 * 60 * 1000)),
51 Long.toString(now)
/frameworks/base/core/tests/coretests/src/android/os/
H A DTestHandlerThread.java39 long now = System.currentTimeMillis();
40 long endTime = now + timeout;
41 while (!mDone && now < endTime) {
43 wait(endTime-now);
47 now = System.currentTimeMillis();
H A DMessageQueueTest.java69 long now = SystemClock.uptimeMillis() + 200;
72 mHandler.sendMessageAtTime(mHandler.obtainMessage(2), now + 1);
73 mHandler.sendMessageAtTime(mHandler.obtainMessage(3), now + 2);
74 mHandler.sendMessageAtTime(mHandler.obtainMessage(4), now + 2);
75 mHandler.sendMessageAtTime(mHandler.obtainMessage(0), now + 0);
76 mHandler.sendMessageAtTime(mHandler.obtainMessage(1), now + 0);
88 long now = SystemClock.uptimeMillis() + 200;
91 mHandler.sendMessageAtTime(mHandler.obtainMessage(3), now);
/frameworks/support/v4/java/android/support/v4/media/
H A DTransportPerformer.java197 final long now = SystemClock.uptimeMillis();
198 onMediaButtonDown(keyCode, new KeyEvent(now, now, KeyEvent.ACTION_DOWN, keyCode, 0));
199 onMediaButtonUp(keyCode, new KeyEvent(now, now, KeyEvent.ACTION_UP, keyCode, 0));
/frameworks/base/policy/src/com/android/internal/policy/impl/
H A DWindowOrientationListener.java456 final long now = event.timestamp;
458 final float timeDeltaMS = (now - then) * 0.000001f;
460 if (now < then
461 || now > then + MAX_FILTER_DELTA_TIME_NANOS
480 mLastFilteredTimestampNanos = now;
501 mAccelerationTimestampNanos = now;
512 addTiltHistoryEntryLocked(now, tiltAngle);
515 if (isFlatLocked(now)) {
517 mFlatTimestampNanos = now;
519 if (isSwingingLocked(now, tiltAngl
692 isPredictedRotationAcceptableLocked(long now) argument
738 updatePredictedRotationLocked(long now, int rotation) argument
755 addTiltHistoryEntryLocked(long now, float tilt) argument
762 isFlatLocked(long now) argument
775 isSwingingLocked(long now, float tilt) argument
798 remainingMS(long now, long until) argument
[all...]
/frameworks/native/opengl/tests/finish/
H A Dfinish.cpp78 long long now, t;
91 now = systemTime();
94 printf("memcpy() time = %llu us\n", (t-now)/1000);
108 now = systemTime();
112 printf("glFinish() time = %llu us\n", (t-now)/1000);
122 now = systemTime();
126 printf("glFinish() time = %llu us\n", (t-now)/1000);
136 now = systemTime();
141 printf("glFinish() time = %llu us\n", (t-now)/1000);
151 now
[all...]
/frameworks/base/core/java/android/content/
H A DSyncContext.java55 final long now = SystemClock.elapsedRealtime();
56 if (now < mLastHeartbeatSendTime + HEARTBEAT_SEND_INTERVAL_IN_MS) return;
58 mLastHeartbeatSendTime = now;
/frameworks/base/services/core/java/com/android/server/notification/
H A DCountdownConditionProvider.java102 final long now = System.currentTimeMillis();
104 DateUtils.getRelativeTimeSpanString(mTime, now, DateUtils.MINUTE_IN_MILLIS);
105 if (mTime <= now) {
113 "%s %s for %s, %s in the future (%s), now=%s",
114 (mTime <= now ? "Not scheduling" : "Scheduling"),
115 ACTION, ts(mTime), mTime - now, span, ts(now)));
146 final long now = System.currentTimeMillis();
148 DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS);
149 return String.format("Scheduled for %s, %s in the future (%s), now
[all...]
H A DDowntimeConditionProvider.java156 final long now = System.currentTimeMillis();
157 if (DEBUG) Slog.d(TAG, "shouldShowCondition now=" + mCalendar.isInDowntime(now)
159 + (mCalendar.nextDowntimeStart(now) <= (now + mLookaheadThreshold)));
160 return mCalendar.isInDowntime(now)
161 || mCalendar.nextDowntimeStart(now) <= (now + mLookaheadThreshold);
249 final long now = System.currentTimeMillis();
250 long endTime = mCalendar.getNextTime(now, downtim
[all...]
/frameworks/base/cmds/input/src/com/android/commands/input/
H A DInput.java183 long now = SystemClock.uptimeMillis();
184 injectKeyEvent(new KeyEvent(now, now, KeyEvent.ACTION_DOWN, keyCode, 0, 0,
187 injectKeyEvent(new KeyEvent(now, now, KeyEvent.ACTION_DOWN, keyCode, 1, 0,
191 injectKeyEvent(new KeyEvent(now, now, KeyEvent.ACTION_UP, keyCode, 0, 0,
196 long now = SystemClock.uptimeMillis();
197 injectMotionEvent(inputSource, MotionEvent.ACTION_DOWN, now, x, y, 1.0f);
198 injectMotionEvent(inputSource, MotionEvent.ACTION_UP, now,
[all...]
/frameworks/base/packages/Keyguard/src/com/android/keyguard/
H A DKeyguardUpdateMonitorCallback.java72 * @param showing Indicates if the keyguard is now visible.
77 final long now = SystemClock.elapsedRealtime();
79 && (now - mVisibilityChangedCalled) < VISIBILITY_CHANGED_COLLAPSE_MS) return;
81 mVisibilityChangedCalled = now;
87 * @param bouncer if true, keyguard is now in bouncer mode.
/frameworks/opt/datetimepicker/src/com/android/datetimepicker/
H A DHapticFeedbackController.java66 long now = SystemClock.uptimeMillis();
68 if (now - mLastVibrate >= VIBRATE_DELAY_MS) {
70 mLastVibrate = now;
/frameworks/base/core/java/android/view/
H A DChoreographer.java106 // Enable/disable using the frame time instead of returning now.
329 final long now = SystemClock.uptimeMillis();
330 final long dueTime = now + delayMillis;
333 if (dueTime <= now) {
334 scheduleFrameLocked(now);
478 private void scheduleFrameLocked(long now) { argument
498 mLastFrameTimeNanos / TimeUtils.NANOS_PER_MS + sFrameDelay, now);
500 Log.d(TAG, "Scheduling next frame in " + (nextFrameTime - now) + " ms.");
563 // We use "now" to determine when callbacks become due because it's possible
566 final long now
775 hasDueCallbacksLocked(long now) argument
779 extractDueCallbacksLocked(long now) argument
[all...]
/frameworks/base/tests/DozeTest/src/com/android/dreams/dozetest/
H A DDozeTestDream.java140 long now = System.currentTimeMillis();
141 now -= now % 60000; // back up to last minute boundary
142 if (mLastTime == now) {
146 mLastTime = now;
147 mTime.setTime(now);
150 mAlarmManager.setExact(AlarmManager.RTC_WAKEUP, now + 60000, mAlarmIntent);
/frameworks/native/services/surfaceflinger/
H A DDispSync.cpp79 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); local
104 nextEventTime = computeNextEventTimeLocked(now);
109 if (now < targetTime) {
110 err = mCond.waitRelative(mMutex, targetTime - now);
121 now = systemTime(SYSTEM_TIME_MONOTONIC);
125 (now - targetTime)) / 64;
131 ATRACE_INT64("DispSync:WakeupLat", now - nextEventTime);
136 callbackInvocations = gatherCallbackInvocationsLocked(now);
207 nsecs_t computeNextEventTimeLocked(nsecs_t now) { argument
211 now);
221 gatherCallbackInvocationsLocked(nsecs_t now) argument
506 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); local
540 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); local
[all...]
/frameworks/base/core/java/android/net/
H A DNetworkPolicyManager.java195 final Time now = new Time(policy.cycleTimezone);
196 now.set(currentTime);
199 final Time cycle = new Time(now);
203 if (Time.compare(cycle, now) >= 0) {
204 // cycle boundary is beyond now, use last cycle boundary; start by
206 final Time lastMonth = new Time(now);
225 final Time now = new Time(policy.cycleTimezone);
226 now.set(currentTime);
229 final Time cycle = new Time(now);
233 if (Time.compare(cycle, now) <
[all...]
/frameworks/base/core/java/android/widget/
H A DDigitalClock.java89 long now = SystemClock.uptimeMillis();
90 long next = now + (1000 - now % 1000);
/frameworks/base/libs/hwui/
H A DDrawProfiler.cpp95 nsecs_t now = systemTime(CLOCK_MONOTONIC); local
96 mData[mCurrentFrame].prepare = NANOS_TO_MILLIS_FLOAT(now - mPreviousTime);
97 mPreviousTime = now;
102 nsecs_t now = systemTime(CLOCK_MONOTONIC); local
103 mData[mCurrentFrame].playback = NANOS_TO_MILLIS_FLOAT(now - mPreviousTime);
104 mPreviousTime = now;
109 nsecs_t now = systemTime(CLOCK_MONOTONIC); local
110 mData[mCurrentFrame].swapBuffers = NANOS_TO_MILLIS_FLOAT(now - mPreviousTime);
111 mPreviousTime = now;
/frameworks/base/core/java/com/android/internal/app/
H A DProcessStats.java283 long now = SystemClock.uptimeMillis();
286 thisProc = thisProc.clone(thisProc.mPackage, now);
491 int curState, long curStartTime, long now) {
501 time += now - curStartTime;
531 int curState, long curStartTime, long now) {
537 time += now - curStartTime;
548 int curState, long curStartTime, long now) {
575 time += now - curStartTime;
580 printAdjTagAndValue(pw, curState, now - curStartTime);
585 public static void computeProcessData(ProcessState proc, ProcessDataCollection data, long now) { argument
490 dumpSingleTime(PrintWriter pw, String prefix, long[] durations, int curState, long curStartTime, long now) argument
530 dumpAdjTimesCheckin(PrintWriter pw, String sep, long[] durations, int curState, long curStartTime, long now) argument
546 dumpServiceTimeCheckin(PrintWriter pw, String label, String packageName, int uid, int vers, String serviceName, ServiceState svc, int serviceType, int opCount, int curState, long curStartTime, long now) argument
635 computeProcessTimeLocked(ProcessState proc, int[] screenStates, int[] memStates, int[] procStates, long now) argument
671 computeTotalMemoryUse(TotalMemoryUseCollection data, long now) argument
818 dumpProcessState(PrintWriter pw, String prefix, ProcessState proc, int[] screenStates, int[] memStates, int[] procStates, long now) argument
1021 dumpProcessStateCsv(PrintWriter pw, ProcessState proc, boolean sepScreenStates, int[] screenStates, boolean sepMemStates, int[] memStates, boolean sepProcStates, int[] procStates, long now) argument
1056 dumpProcessList(PrintWriter pw, String prefix, ArrayList<ProcessState> procs, int[] screenStates, int[] memStates, int[] procStates, long now) argument
1076 dumpProcessSummaryDetails(PrintWriter pw, ProcessState proc, String prefix, String label, int[] screenStates, int[] memStates, int[] procStates, long now, long totalTime, boolean full) argument
1098 dumpProcessSummaryLocked(PrintWriter pw, String prefix, ArrayList<ProcessState> procs, int[] screenStates, int[] memStates, int[] procStates, boolean inclUidVers, long now, long totalTime) argument
1190 dumpProcessListCsv(PrintWriter pw, ArrayList<ProcessState> procs, boolean sepScreenStates, int[] screenStates, boolean sepMemStates, int[] memStates, boolean sepProcStates, int[] procStates, long now) argument
1250 dumpAllProcessStateCheckin(PrintWriter pw, ProcessState proc, long now) argument
1539 writeToParcel(Parcel out, long now, int flags) argument
2160 dumpLocked(PrintWriter pw, String reqPackage, long now, boolean dumpSummary, boolean dumpAll, boolean activeOnly) argument
2364 dumpSingleServiceTime(PrintWriter pw, String prefix, ServiceState service, int serviceType, int curState, long curStartTime, long now) argument
2402 dumpServiceStats(PrintWriter pw, String prefix, String prefixInner, String headerPrefix, String header, ServiceState service, int count, int serviceType, int state, long startTime, long now, long totalTime, boolean dumpAll) argument
2424 dumpSummaryLocked(PrintWriter pw, String reqPackage, long now, boolean activeOnly) argument
2450 dumpTotalsLocked(PrintWriter pw, long now) argument
2512 dumpFilteredSummaryLocked(PrintWriter pw, String header, String prefix, int[] screenStates, int[] memStates, int[] procStates, int[] sortProcStates, long now, long totalTime, String reqPackage, boolean activeOnly) argument
2527 collectProcessesLocked(int[] screenStates, int[] memStates, int[] procStates, int sortProcStates[], long now, String reqPackage, boolean activeOnly) argument
2883 getDuration(int state, long now) argument
2949 ProcessState(ProcessState commonProcess, String pkg, int uid, int vers, String name, long now) argument
2960 clone(String pkg, long now) argument
3011 resetSafely(long now) argument
3036 writeToParcel(Parcel out, long now) argument
3105 setState(int state, int memFactor, long now, ArrayMap<String, ProcessStateHolder> pkgList) argument
3129 setState(int state, long now) argument
3138 commitStateTime(long now) argument
3179 incStartedServices(int memFactor, long now, String serviceName) argument
3195 decStartedServices(int memFactor, long now, String serviceName) argument
3412 getDuration(int state, long now) argument
3590 resetSafely(long now) argument
3599 writeToParcel(Parcel out, long now) argument
3618 commitStateTime(long now) argument
3638 updateRunning(int memFactor, long now) argument
3653 setStarted(boolean started, int memFactor, long now) argument
3661 setRestarting(boolean restarting, int memFactor, long now) argument
3666 updateStartedState(int memFactor, long now) argument
3691 setBound(boolean bound, int memFactor, long now) argument
3709 setExecuting(boolean executing, int memFactor, long now) argument
3726 getDuration(int opType, int curState, long startTime, int memFactor, long now) argument
[all...]
/frameworks/base/core/java/com/android/internal/view/
H A DBaseSurfaceHolder.java199 long now = SystemClock.uptimeMillis();
201 if (nextTime > now) {
203 Thread.sleep(nextTime-now);
206 now = SystemClock.uptimeMillis();
208 mLastLockTime = now;

Completed in 460 milliseconds

1234567