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

12345678

/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/media/packages/BluetoothMidiService/src/com/android/bluetoothmidiservice/
H A DMidiBtleTimeTracker.java40 public MidiBtleTimeTracker(long now) { argument
42 mBaseHostTimeNanos = now;
43 mPreviousNow = now;
49 * @param now
53 public long convertTimestampToNanotime(int timestamp, long now) { argument
63 if ((now - mPreviousNow) > (RANGE_NANOS / 2)) {
65 long minimumTimeNanos = (now - mBaseHostTimeNanos)
78 if (timestampHostNanos > now) {
80 mBaseHostTimeNanos = now;
81 timestampHostNanos = now;
[all...]
/frameworks/volley/src/test/java/com/android/volley/toolbox/
H A DHttpHeaderParserTest.java86 long now = System.currentTimeMillis();
87 headers.put("Date", rfc1123Date(now));
88 headers.put("Last-Modified", rfc1123Date(now - ONE_DAY_MILLIS));
89 headers.put("Expires", rfc1123Date(now + ONE_HOUR_MILLIS));
95 assertEqualsWithin(entry.serverDate, now, ONE_MINUTE_MILLIS);
96 assertEqualsWithin(entry.lastModified, (now - ONE_DAY_MILLIS), ONE_MINUTE_MILLIS);
97 assertTrue(entry.softTtl >= (now + ONE_HOUR_MILLIS));
102 long now = System.currentTimeMillis();
103 headers.put("Date", rfc1123Date(now));
104 headers.put("Expires", rfc1123Date(now
[all...]
/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/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();
/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/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/policy/
H A DWindowOrientationListener.java601 final long now = event.timestamp;
603 final float timeDeltaMS = (now - then) * 0.000001f;
605 if (now < then
606 || now > then + MAX_FILTER_DELTA_TIME_NANOS
625 mLastFilteredTimestampNanos = now;
646 mAccelerationTimestampNanos = now;
657 addTiltHistoryEntryLocked(now, tiltAngle);
660 if (isFlatLocked(now)) {
662 mFlatTimestampNanos = now;
664 if (isSwingingLocked(now, tiltAngl
867 isPredictedRotationAcceptableLocked(long now) argument
905 updatePredictedRotationLocked(long now, int rotation) argument
922 addTiltHistoryEntryLocked(long now, float tilt) argument
929 isFlatLocked(long now) argument
942 isSwingingLocked(long now, float tilt) argument
965 remainingMS(long now, long until) argument
1047 isDesiredRotationAcceptableLocked(long now) argument
1057 scheduleRotationEvaluationIfNecessaryLocked(long now) argument
[all...]
/frameworks/base/services/core/java/com/android/server/notification/
H A DCountdownConditionProvider.java126 final long now = System.currentTimeMillis();
128 DateUtils.getRelativeTimeSpanString(mTime, now, DateUtils.MINUTE_IN_MILLIS);
129 if (mTime <= now) {
137 "%s %s for %s, %s in the future (%s), now=%s",
138 (mTime <= now ? "Not scheduling" : "Scheduling"),
139 ACTION, ts(mTime), mTime - now, span, ts(now)));
170 final long now = System.currentTimeMillis();
172 DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS);
173 return String.format("Scheduled for %s, %s in the future (%s), now
[all...]
H A DScheduleConditionProvider.java82 final long now = System.currentTimeMillis();
85 pw.print(meetsSchedule(conditionId, now) ? "* " : " ");
88 dumpUpcomingTime(pw, "mNextAlarmTime", mNextAlarmTime, now);
145 final long now = System.currentTimeMillis();
149 if (cal != null && cal.isInSchedule(now)) {
155 final long nextChangeTime = cal.getNextChangeTime(now);
156 if (nextChangeTime > 0 && nextChangeTime > now) {
163 updateAlarm(now, mNextAlarmTime);
166 private void updateAlarm(long now, long time) { argument
175 if (time > now) {
[all...]
H A DSystemConditionProviderService.java50 protected static void dumpUpcomingTime(PrintWriter pw, String var, long time, long now) { argument
53 pw.printf("%s, in %s, now=%s", ts(time), formatDuration(time - now), ts(now));
H A DScheduleCalendar.java59 public long getNextChangeTime(long now) { argument
61 final long nextStart = getNextTime(now, mSchedule.startHour, mSchedule.startMinute);
62 final long nextEnd = getNextTime(now, mSchedule.endHour, mSchedule.endMinute);
66 private long getNextTime(long now, int hr, int min) { argument
67 final long time = getTime(now, hr, min);
68 return time <= now ? addDays(time, 1) : time;
/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/SettingsLib/src/com/android/settingslib/datetime/
H A DZoneGetter.java56 public static String getTimeZoneOffsetAndName(TimeZone tz, Date now) { argument
58 String gmtString = getGmtOffsetString(locale, tz, now);
59 String zoneNameString = getZoneLongName(locale, tz, now);
70 final Date now = new Date();
103 String zoneLongName = getZoneLongName(locale, tz, now);
120 String displayName = getZoneDisplayName(locale, tz, now, preferLongName);
122 String gmtOffsetString = getGmtOffsetString(locale, tz, now);
123 int offsetMillis = tz.getOffset(now.getTime());
146 private static String getZoneDisplayName(Locale locale, TimeZone tz, Date now, argument
150 zoneNameString = getZoneLongName(locale, tz, now);
196 getZoneLongName(Locale locale, TimeZone tz, Date now) argument
202 getGmtOffsetString(Locale locale, TimeZone tz, Date now) argument
[all...]
/frameworks/base/core/java/android/view/
H A DChoreographer.java112 // Enable/disable using the frame time instead of returning now.
369 final long now = SystemClock.uptimeMillis();
370 final long dueTime = now + delayMillis;
373 if (dueTime <= now) {
374 scheduleFrameLocked(now);
518 private void scheduleFrameLocked(long now) { argument
538 mLastFrameTimeNanos / TimeUtils.NANOS_PER_MS + sFrameDelay, now);
540 Log.d(TAG, "Scheduling next frame in " + (nextFrameTime - now) + " ms.");
624 // We use "now" to determine when callbacks become due because it's possible
627 final long now
866 hasDueCallbacksLocked(long now) argument
870 extractDueCallbacksLocked(long now) argument
[all...]
/frameworks/base/core/java/android/widget/
H A DDigitalClock.java86 long now = SystemClock.uptimeMillis();
87 long next = now + (1000 - now % 1000);
/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/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/support/v7/appcompat/src/android/support/v7/app/
H A DTwilightManager.java129 final long now = System.currentTimeMillis();
133 calculator.calculateTwilight(now - DateUtils.DAY_IN_MILLIS,
138 calculator.calculateTwilight(now, location.getLatitude(), location.getLongitude());
144 calculator.calculateTwilight(now + DateUtils.DAY_IN_MILLIS,
152 nextUpdate = now + 12 * DateUtils.HOUR_IN_MILLIS;
154 if (now > todaySunset) {
156 } else if (now > todaySunrise) {
/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.java221 final Time now = new Time(policy.cycleTimezone);
222 now.set(currentTime);
225 final Time cycle = new Time(now);
229 if (Time.compare(cycle, now) >= 0) {
230 // cycle boundary is beyond now, use last cycle boundary; start by
232 final Time lastMonth = new Time(now);
251 final Time now = new Time(policy.cycleTimezone);
252 now.set(currentTime);
255 final Time cycle = new Time(now);
259 if (Time.compare(cycle, now) <
[all...]

Completed in 743 milliseconds

12345678