Home
last modified time | relevance | path

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

12345678910>>...18

/frameworks/base/core/java/com/android/internal/app/procstats/
DServiceState.java111 public void setMemFactor(int memFactor, long now) { in setMemFactor() argument
113 setRestarting(true, memFactor, now); in setMemFactor()
116 setStarted(true, memFactor, now); in setMemFactor()
119 setBound(true, memFactor, now); in setMemFactor()
122 setExecuting(true, memFactor, now); in setMemFactor()
137 long now = SystemClock.uptimeMillis(); in applyNewOwner() local
142 setStarted(false, 0, now); in applyNewOwner()
148 setBound(false, 0, now); in applyNewOwner()
154 setExecuting(false, 0, now); in applyNewOwner()
165 long now = SystemClock.uptimeMillis(); in clearCurrentOwner() local
[all …]
DProcessState.java181 long now) { in ProcessState() argument
189 mStartTime = now; in ProcessState()
194 public ProcessState clone(long now) { in clone() argument
195 ProcessState pnew = new ProcessState(this, mPackage, mUid, mVersion, mName, now); in clone()
260 public void resetSafely(long now) { in resetSafely() argument
263 mStartTime = now; in resetSafely()
284 public void writeToParcel(Parcel out, long now) { in writeToParcel() argument
356 public void setState(int state, int memFactor, long now, in setState() argument
366 mCommonProcess.setState(state, now); in setState()
375 pullFixedProc(pkgList, ip).setState(state, now); in setState()
[all …]
/frameworks/base/services/core/java/com/android/server/job/
DJobPackageTracker.java77 public long getActiveTime(long now) { in getActiveTime() argument
80 time += now - activeStartTime; in getActiveTime()
85 public long getActiveTopTime(long now) { in getActiveTopTime() argument
88 time += now - activeTopStartTime; in getActiveTopTime()
93 public long getPendingTime(long now) { in getPendingTime() argument
96 time += now - pendingStartTime; in getPendingTime()
145 long getTotalTime(long now) { in getTotalTime() argument
149 return now - mStartUptimeTime; in getTotalTime()
152 void incPending(int uid, String pkg, long now) { in incPending() argument
155 pe.pendingStartTime = now; in incPending()
[all …]
/frameworks/volley/src/test/java/com/android/volley/toolbox/
DHttpHeaderParserTest.java86 long now = System.currentTimeMillis(); in parseCacheHeaders_normalExpire() local
87 headers.put("Date", rfc1123Date(now)); in parseCacheHeaders_normalExpire()
88 headers.put("Last-Modified", rfc1123Date(now - ONE_DAY_MILLIS)); in parseCacheHeaders_normalExpire()
89 headers.put("Expires", rfc1123Date(now + ONE_HOUR_MILLIS)); in parseCacheHeaders_normalExpire()
95 assertEqualsWithin(entry.serverDate, now, ONE_MINUTE_MILLIS); in parseCacheHeaders_normalExpire()
96 assertEqualsWithin(entry.lastModified, (now - ONE_DAY_MILLIS), ONE_MINUTE_MILLIS); in parseCacheHeaders_normalExpire()
97 assertTrue(entry.softTtl >= (now + ONE_HOUR_MILLIS)); in parseCacheHeaders_normalExpire()
102 long now = System.currentTimeMillis(); in parseCacheHeaders_expiresInPast() local
103 headers.put("Date", rfc1123Date(now)); in parseCacheHeaders_expiresInPast()
104 headers.put("Expires", rfc1123Date(now - ONE_HOUR_MILLIS)); in parseCacheHeaders_expiresInPast()
[all …]
/frameworks/base/packages/Osu/src/com/android/hotspot2/osu/service/
DSubscriptionTimer.java29 private UpdateAction(HomeSP homeSP, long now) { in UpdateAction() argument
31 now + homeSP.getSubscriptionUpdate().getInterval() : -1; in UpdateAction()
33 now + homeSP.getPolicy().getPolicyUpdate().getInterval() : -1; in UpdateAction()
40 private boolean remediate(long now) { in remediate() argument
41 return mRemediation > 0 && now >= mRemediation; in remediate()
44 private boolean policyUpdate(long now) { in policyUpdate() argument
45 return mPolicy > 0 && now >= mPolicy; in policyUpdate()
48 private long nextExpiry(long now) { in nextExpiry() argument
50 if (mRemediation > now) { in nextExpiry()
53 if (mPolicy > now) { in nextExpiry()
[all …]
/frameworks/base/media/packages/BluetoothMidiService/src/com/android/bluetoothmidiservice/
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 …]
/frameworks/base/services/core/java/com/android/server/policy/
DWindowOrientationListener.java595 final long now = event.timestamp; in onSensorChanged() local
597 final float timeDeltaMS = (now - then) * 0.000001f; in onSensorChanged()
599 if (now < then in onSensorChanged()
600 || now > then + MAX_FILTER_DELTA_TIME_NANOS in onSensorChanged()
619 mLastFilteredTimestampNanos = now; in onSensorChanged()
640 mAccelerationTimestampNanos = now; in onSensorChanged()
651 addTiltHistoryEntryLocked(now, tiltAngle); in onSensorChanged()
654 if (isFlatLocked(now)) { in onSensorChanged()
656 mFlatTimestampNanos = now; in onSensorChanged()
658 if (isSwingingLocked(now, tiltAngle)) { in onSensorChanged()
[all …]
/frameworks/native/opengl/tests/finish/
Dfinish.cpp78 long long now, t; in main() local
91 now = systemTime(); in main()
94 printf("memcpy() time = %llu us\n", (t-now)/1000); in main()
108 now = systemTime(); in main()
112 printf("glFinish() time = %llu us\n", (t-now)/1000); in main()
122 now = systemTime(); in main()
126 printf("glFinish() time = %llu us\n", (t-now)/1000); in main()
136 now = systemTime(); in main()
141 printf("glFinish() time = %llu us\n", (t-now)/1000); in main()
151 now = systemTime(); in main()
[all …]
/frameworks/base/services/core/java/com/android/server/notification/
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()
DCountdownConditionProvider.java121 final long now = System.currentTimeMillis(); in onSubscribe() local
123 DateUtils.getRelativeTimeSpanString(mTime, now, DateUtils.MINUTE_IN_MILLIS); in onSubscribe()
124 if (mTime <= now) { in onSubscribe()
133 (mTime <= now ? "Not scheduling" : "Scheduling"), in onSubscribe()
134 ACTION, ts(mTime), mTime - now, span, ts(now))); in onSubscribe()
165 final long now = System.currentTimeMillis(); in tryParseDescription() local
167 DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS); in tryParseDescription()
169 ts(time), time - now, span, ts(now)); in tryParseDescription()
DScheduleConditionProvider.java93 final long now = System.currentTimeMillis(); in dump() local
96 pw.print(meetsSchedule(mSubscriptions.get(conditionId), now) ? "* " : " "); in dump()
102 dumpUpcomingTime(pw, "mNextAlarmTime", mNextAlarmTime, now); in dump()
158 final long now = System.currentTimeMillis(); in evaluateSubscriptions() local
163 if (cal != null && cal.isInSchedule(now)) { in evaluateSubscriptions()
164 if (conditionSnoozed(conditionId) || cal.shouldExitForAlarm(now)) { in evaluateSubscriptions()
170 cal.maybeSetNextAlarm(now, nextUserAlarmTime); in evaluateSubscriptions()
175 cal.maybeSetNextAlarm(now, nextUserAlarmTime); in evaluateSubscriptions()
179 final long nextChangeTime = cal.getNextChangeTime(now); in evaluateSubscriptions()
180 if (nextChangeTime > 0 && nextChangeTime > now) { in evaluateSubscriptions()
[all …]
DScheduleCalendar.java43 public void maybeSetNextAlarm(long now, long nextAlarm) { in maybeSetNextAlarm() argument
45 if (mSchedule.exitAtAlarm && now > mSchedule.nextAlarm) { in maybeSetNextAlarm()
55 public long getNextChangeTime(long now) { in getNextChangeTime() argument
57 final long nextStart = getNextTime(now, mSchedule.startHour, mSchedule.startMinute); in getNextChangeTime()
58 final long nextEnd = getNextTime(now, mSchedule.endHour, mSchedule.endMinute); in getNextChangeTime()
64 private long getNextTime(long now, int hr, int min) { in getNextTime() argument
65 final long time = getTime(now, hr, min); in getNextTime()
66 return time <= now ? addDays(time, 1) : time; in getNextTime()
/frameworks/base/cmds/input/src/com/android/commands/input/
DInput.java183 long now = SystemClock.uptimeMillis(); in sendKeyEvent() local
184 injectKeyEvent(new KeyEvent(now, now, KeyEvent.ACTION_DOWN, keyCode, 0, 0, in sendKeyEvent()
187 injectKeyEvent(new KeyEvent(now, now, KeyEvent.ACTION_DOWN, keyCode, 1, 0, in sendKeyEvent()
191 injectKeyEvent(new KeyEvent(now, now, KeyEvent.ACTION_UP, keyCode, 0, 0, in sendKeyEvent()
196 long now = SystemClock.uptimeMillis(); in sendTap() local
197 injectMotionEvent(inputSource, MotionEvent.ACTION_DOWN, now, x, y, 1.0f); in sendTap()
198 injectMotionEvent(inputSource, MotionEvent.ACTION_UP, now, x, y, 0.0f); in sendTap()
205 long now = SystemClock.uptimeMillis(); in sendSwipe() local
206 injectMotionEvent(inputSource, MotionEvent.ACTION_DOWN, now, x1, y1, 1.0f); in sendSwipe()
207 long startTime = now; in sendSwipe()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/datetime/
DZoneGetter.java55 public static String getTimeZoneOffsetAndName(TimeZone tz, Date now) { in getTimeZoneOffsetAndName() argument
57 String gmtString = getGmtOffsetString(locale, tz, now); in getTimeZoneOffsetAndName()
59 String zoneNameString = getZoneLongName(timeZoneNames, tz, now); in getTimeZoneOffsetAndName()
70 final Date now = new Date(); in getZonesList() local
101 gmtOffsetStrings[i] = getGmtOffsetString(locale, tz, now); in getZonesList()
117 String displayName = getZoneLongName(timeZoneNames, tz, now); in getZonesList()
140 displayName = getZoneLongName(timeZoneNames, tz, now); in getZonesList()
145 displayName = getZoneLongName(timeZoneNames, tz, now); in getZonesList()
152 int offsetMillis = tz.getOffset(now.getTime()); in getZonesList()
205 private static String getZoneLongName(TimeZoneNames names, TimeZone tz, Date now) { in getZoneLongName() argument
[all …]
/frameworks/base/core/java/android/view/
DChoreographer.java383 final long now = SystemClock.uptimeMillis(); in postCallbackDelayedInternal() local
384 final long dueTime = now + delayMillis; in postCallbackDelayedInternal()
387 if (dueTime <= now) { in postCallbackDelayedInternal()
388 scheduleFrameLocked(now); in postCallbackDelayedInternal()
532 private void scheduleFrameLocked(long now) { in scheduleFrameLocked() argument
552 mLastFrameTimeNanos / TimeUtils.NANOS_PER_MS + sFrameDelay, now); in scheduleFrameLocked()
554 Log.d(TAG, "Scheduling next frame in " + (nextFrameTime - now) + " ms."); in scheduleFrameLocked()
643 final long now = System.nanoTime(); in doCallbacks() local
645 now / TimeUtils.NANOS_PER_MS); in doCallbacks()
660 final long jitterNanos = now - frameTimeNanos; in doCallbacks()
[all …]
/frameworks/base/core/tests/coretests/src/android/provider/
DSmsProviderTest.java40 long now = System.currentTimeMillis(); in testProvider() local
48 Long.toString(now - (5 * 24 * 60 * 60 * 1000)), in testProvider()
49 Long.toString(now - (2 * 24 * 60 * 60 * 1000)), in testProvider()
50 Long.toString(now - (5 * 60 * 60 * 1000)), in testProvider()
51 Long.toString(now - (30 * 60 * 1000)), in testProvider()
52 Long.toString(now - (5 * 60 * 1000)), in testProvider()
53 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/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()
/frameworks/support/media-compat/java/android/support/v4/media/
DTransportPerformer.java197 final long now = SystemClock.uptimeMillis(); in onAudioFocusChange() local
198 onMediaButtonDown(keyCode, new KeyEvent(now, now, KeyEvent.ACTION_DOWN, keyCode, 0)); in onAudioFocusChange()
199 onMediaButtonUp(keyCode, new KeyEvent(now, now, KeyEvent.ACTION_UP, keyCode, 0)); in onAudioFocusChange()
/frameworks/native/services/surfaceflinger/
DDispSync.cpp99 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); in threadLoop() local
129 targetTime = computeNextEventTimeLocked(now); in threadLoop()
133 if (now < targetTime) { in threadLoop()
142 err = mCond.waitRelative(mMutex, targetTime - now); in threadLoop()
154 now = systemTime(SYSTEM_TIME_MONOTONIC); in threadLoop()
161 (now - targetTime)) / 64; in threadLoop()
164 ATRACE_INT64("DispSync:WakeupLat", now - targetTime); in threadLoop()
169 callbackInvocations = gatherCallbackInvocationsLocked(now); in threadLoop()
244 nsecs_t computeNextEventTimeLocked(nsecs_t now) { in computeNextEventTimeLocked() argument
250 now); in computeNextEventTimeLocked()
[all …]
/frameworks/base/tests/DozeTest/src/com/android/dreams/dozetest/
DDozeTestDream.java140 long now = System.currentTimeMillis(); in performTimeUpdate() local
141 now -= now % 60000; // back up to last minute boundary in performTimeUpdate()
142 if (mLastTime == now) { in performTimeUpdate()
146 mLastTime = now; in performTimeUpdate()
147 mTime.setTime(now); in performTimeUpdate()
150 mAlarmManager.setExact(AlarmManager.RTC_WAKEUP, now + 60000, mAlarmIntent); in performTimeUpdate()
/frameworks/base/services/core/java/com/android/server/am/
DProcessStatsService.java128 public boolean setMemFactorLocked(int memFactor, boolean screenOn, long now) { in setMemFactorLocked() argument
137 += now - mProcessStats.mStartTime; in setMemFactorLocked()
140 mProcessStats.mStartTime = now; in setMemFactorLocked()
152 service.setMemFactor(memFactor, now); in setMemFactorLocked()
171 public boolean shouldWriteNowLocked(long now) { in shouldWriteNowLocked() argument
172 if (now > (mLastWriteTime+WRITE_PERIOD)) { in shouldWriteNowLocked()
210 long now = SystemClock.uptimeMillis(); in writeStateLocked() local
214 mProcessStats.mTimePeriodEndUptime = now; in writeStateLocked()
227 Slog.i(TAG, "Prepared write state in " + (SystemClock.uptimeMillis()-now) + "ms"); in writeStateLocked()
379 boolean sepProcStates, int[] procStates, long now, String reqPackage) { in dumpFilteredProcessesCsvLocked() argument
[all …]
/frameworks/base/native/android/
Dchoreographer.cpp113 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); in postFrameCallbackDelayed() local
114 FrameCallback callback{cb, data, now + delay}; in postFrameCallbackDelayed()
119 if (callback.dueTime <= now) { in postFrameCallbackDelayed()
134 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); in scheduleCallbacks() local
135 if (mCallbacks.top().dueTime <= now) { in scheduleCallbacks()
152 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); in dispatchVsync() local
153 while (!mCallbacks.empty() && mCallbacks.top().dueTime < now) { in dispatchVsync()
/frameworks/support/v7/appcompat/src/android/support/v7/app/
DTwilightManager.java143 final long now = System.currentTimeMillis(); in updateState() local
147 calculator.calculateTwilight(now - DateUtils.DAY_IN_MILLIS, in updateState()
152 calculator.calculateTwilight(now, location.getLatitude(), location.getLongitude()); in updateState()
158 calculator.calculateTwilight(now + DateUtils.DAY_IN_MILLIS, in updateState()
166 nextUpdate = now + 12 * DateUtils.HOUR_IN_MILLIS; in updateState()
168 if (now > todaySunset) { in updateState()
170 } else if (now > todaySunrise) { in updateState()

12345678910>>...18