Home
last modified time | relevance | path

Searched refs:time (Results 1 – 25 of 1475) sorted by relevance

12345678910>>...59

/frameworks/base/core/tests/coretests/src/android/util/
DTimeSparseArrayTest.java48 for (long time = -43; time <= 10; time++) { in closestIndexOnOrAfter()
49 assertThat(timeSparseArray.closestIndexOnOrAfter(time)).isEqualTo(0); in closestIndexOnOrAfter()
52 for (long time = 11; time <= 51; time++) { in closestIndexOnOrAfter()
53 assertThat(timeSparseArray.closestIndexOnOrAfter(time)).isEqualTo(1); in closestIndexOnOrAfter()
56 for (long time = 52; time <= 59; time++) { in closestIndexOnOrAfter()
57 assertThat(timeSparseArray.closestIndexOnOrAfter(time)).isEqualTo(2); in closestIndexOnOrAfter()
60 for (long time = 60; time <= 102; time++) { in closestIndexOnOrAfter()
61 assertThat(timeSparseArray.closestIndexOnOrAfter(time)).isEqualTo(3); in closestIndexOnOrAfter()
81 for (long time = -42; time < 4; time++) { in closestIndexOnOrBefore()
82 assertThat(timeSparseArray.closestIndexOnOrBefore(time)).isEqualTo(-1); in closestIndexOnOrBefore()
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/
DLayerHistoryTest.cpp118 void recordFramesAndExpect(const sp<MockLayer>& layer, nsecs_t& time, Fps frameRate, in recordFramesAndExpect() argument
122 history().record(layer->getSequence(), layer->getLayerProps(), time, time, in recordFramesAndExpect()
124 time += frameRate.getPeriodNsecs(); in recordFramesAndExpect()
126 summary = summarizeLayerHistory(time); in recordFramesAndExpect()
160 nsecs_t time = systemTime(); in TEST_F() local
163 EXPECT_TRUE(summarizeLayerHistory(time).empty()); in TEST_F()
166 history().record(layer->getSequence(), layer->getLayerProps(), 0, time, in TEST_F()
170 EXPECT_TRUE(summarizeLayerHistory(time).empty()); in TEST_F()
184 nsecs_t time = systemTime(); in TEST_F() local
186 EXPECT_TRUE(summarizeLayerHistory(time).empty()); in TEST_F()
[all …]
DVSyncReactorTest.cpp82 void signalFenceWithTime(std::shared_ptr<android::FenceTime> const& fence, nsecs_t time) { in signalFenceWithTime() argument
83 android::FenceTime::Snapshot snap(time); in signalFenceWithTime()
87 std::shared_ptr<android::FenceTime> generateSignalledFenceWithTime(nsecs_t time) { in generateSignalledFenceWithTime() argument
90 signalFenceWithTime(ft, time); in generateSignalledFenceWithTime()
328 auto time = 0; in TEST_F() local
331 time += period; in TEST_F()
332 EXPECT_TRUE(mReactor.addHwVsyncTimestamp(time, std::nullopt, &periodFlushed)); in TEST_F()
336 time += newPeriod; in TEST_F()
337 EXPECT_FALSE(mReactor.addHwVsyncTimestamp(time, std::nullopt, &periodFlushed)); in TEST_F()
341 time += newPeriod; in TEST_F()
[all …]
/frameworks/av/media/libaaudio/src/utility/
DAudioClock.h35 struct timespec time; variable
36 int result = clock_gettime(clockId, &time);
40 return (time.tv_sec * AAUDIO_NANOS_PER_SECOND) + time.tv_nsec;
55 struct timespec time; variable
56 time.tv_sec = nanoTime / AAUDIO_NANOS_PER_SECOND;
58 time.tv_nsec = nanoTime - (time.tv_sec * AAUDIO_NANOS_PER_SECOND);
59 int err = clock_nanosleep(clockId, TIMER_ABSTIME, &time, nullptr);
84 struct timespec time; variable
85 time.tv_sec = nanoseconds / AAUDIO_NANOS_PER_SECOND;
87 time.tv_nsec = nanoseconds - (time.tv_sec * AAUDIO_NANOS_PER_SECOND);
[all …]
/frameworks/opt/calendar/tests/src/com/android/calendarcommon2/
DTimeTest.java416 public boolean equals(Time time) {
417 return time.getYear() == year2 && time.getMonth() == month2 && time.getDay() == day2
418 && time.getHour() == hour2 && time.getMinute() == minute2;
574 Time time = new Time("America/Los_Angeles");
575 time.set(4, 10, 2007); // set to Nov 4, 2007, 12am
576 assertEquals(1194159600000L, time.normalize());
577 time.add(Time.MONTH_DAY, 1); // changes to Nov 5, 2007, 12am
578 assertEquals(1194249600000L, time.toMillis());
580 time = new Time("America/Los_Angeles");
581 time.set(11, 2, 2007); // set to Mar 11, 2007, 12am
[all …]
/frameworks/base/core/java/android/service/notification/
DScheduleCalendar.java107 final long time = adjust ? getClosestActualTime(now, hr, min) : getTime(now, hr, min); in getNextTime() local
108 if (time <= now) { in getNextTime()
109 final long tomorrow = addDays(time, 1); in getNextTime()
112 return time; in getNextTime()
128 public boolean isInSchedule(long time) { in isInSchedule() argument
130 final long start = getClosestActualTime(time, mSchedule.startHour, mSchedule.startMinute); in isInSchedule()
131 long end = getTime(time, mSchedule.endHour, mSchedule.endMinute); in isInSchedule()
135 return isInSchedule(-1, time, start, end) || isInSchedule(0, time, start, end); in isInSchedule()
160 public boolean shouldExitForAlarm(long time) { in shouldExitForAlarm() argument
166 && time >= mSchedule.nextAlarm in shouldExitForAlarm()
[all …]
/frameworks/native/opengl/specs/
DEGL_ANDROID_presentation_time.txt39 Often when rendering a sequence of images, there is some time at which each
41 this desired presentation time to be specified for each frame rendered to
47 * EGLnsecsANDROID is a signed integer type for representing a time in
59 EGLnsecsANDROID time);
74 surface, EGLnsecsANDROID time);
76 specifies the time at which the current color buffer of surface should be
77 presented to the viewer. The time parameter should be a time in
78 nanoseconds, but the exact meaning of the time depends on the native
79 window system's use of the presentation time. In situations where
80 an absolute time is needed such as displaying the color buffer on a
[all …]
/frameworks/base/services/core/java/com/android/server/display/utils/
DAmbientFilter.java75 public boolean addValue(long time, float value) { in addValue() argument
79 truncateOldValues(time); in addValue()
81 Slog.d(mTag, "add value: " + value + " @ " + time); in addValue()
83 mBuffer.add(time, value); in addValue()
95 public float getEstimate(long time) { in getEstimate() argument
96 truncateOldValues(time); in getEstimate()
97 final float value = filter(time, mBuffer); in getEstimate()
99 Slog.d(mTag, "get estimate: " + value + " @ " + time); in getEstimate()
146 private void truncateOldValues(long time) { in truncateOldValues() argument
147 final long minTime = time - mHorizon; in truncateOldValues()
[all …]
/frameworks/base/core/java/android/os/
DSystemClock.java21 import android.app.time.UnixEpochTime;
31 import java.time.Clock;
32 import java.time.DateTimeException;
33 import java.time.ZoneOffset;
303 UnixEpochTime time;
305 time = timeDetectorService.latestNetworkTime();
313 if (time == null) {
318 long deltaMs = currentMillis - time.getElapsedRealtimeMillis();
319 return time.getUnixEpochTimeMillis() + deltaMs;
369 LocationTime time;
[all …]
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/tv/
DTvPipBoundsControllerTest.kt67 var time = 0L variable in com.android.wm.shell.pip.tv.TvPipBoundsControllerTest
91 time = 0L in setUp()
95 testLooper = TestLooper { time } in setUp()
105 { time }, in setUp()
117 assertNoMovementUpTo(time + FAR_FUTURE) in testPlacement_MovedAfterDebounceTimeout()
142 advanceTimeTo(time + POSITION_DEBOUNCE_TIMEOUT_MILLIS / 10) in testNoMovementUntilPlacementStabilizes()
144 advanceTimeTo(time + POSITION_DEBOUNCE_TIMEOUT_MILLIS / 10) in testNoMovementUntilPlacementStabilizes()
146 advanceTimeTo(time + POSITION_DEBOUNCE_TIMEOUT_MILLIS / 10) in testNoMovementUntilPlacementStabilizes()
149 assertMovementAt(time + POSITION_DEBOUNCE_TIMEOUT_MILLIS, MOVED_BOUNDS) in testNoMovementUntilPlacementStabilizes()
159 assertMovementAt(time + POSITION_DEBOUNCE_TIMEOUT_MILLIS, ANCHOR_BOUNDS) in testUnstashIfStashNoLongerNecessary()
[all …]
/frameworks/base/tests/notification/src/com/android/frameworks/tests/notification/
DNotificationTests.java256 final long time = SystemClock.currentThreadTimeMillis(); in testCreate() local
258 L(" %s: create=%dms", summarize(n), SystemClock.currentThreadTimeMillis() - time); in testCreate()
273 final long time = SystemClock.currentThreadTimeMillis(); in testCreate() local
290 … L(" %s: create=%dms", phoneCall.toString(), SystemClock.currentThreadTimeMillis() - time); in testCreate()
295 final long time = SystemClock.currentThreadTimeMillis(); in testCreate() local
303 L(" %s: create=%dms", summarize(n), SystemClock.currentThreadTimeMillis() - time); in testCreate()
308 final long time = SystemClock.currentThreadTimeMillis(); in testCreate() local
324 L(" %s: create=%dms", summarize(n), SystemClock.currentThreadTimeMillis() - time); in testCreate()
331 final long time = SystemClock.currentThreadTimeMillis(); in testCreate() local
348 L(" %s: create=%dms", summarize(n), SystemClock.currentThreadTimeMillis() - time); in testCreate()
[all …]
/frameworks/av/services/mediametrics/include/mediametricsservice/
DTimeMachine.h79 KeyHistory(T key, uid_t allowUid, int64_t time) in KeyHistory() argument
82 , mCreationTime(time) in KeyHistory()
83 , mLastModificationTime(time) in KeyHistory()
92 putValue(AMEDIAMETRICS_PROP_ALLOWUID, (int32_t)allowUid, time); in KeyHistory()
108 status_t getValue(const std::string &property, T* value, int64_t time = 0) const
110 if (time == 0) time = systemTime(SYSTEM_TIME_REALTIME); in REQUIRES()
114 auto eptr = timeSequence.upper_bound(time); in REQUIRES()
125 status_t getValue(const std::string &property, T defaultValue, int64_t time = 0) const
128 return getValue(property, &value, time) != NO_ERROR ? defaultValue : value; in REQUIRES()
132 const std::string &name, const mediametrics::Item::Prop &prop, int64_t time = 0)
[all …]
/frameworks/base/services/core/java/com/android/server/notification/
DSystemConditionProviderService.java40 protected static String ts(long time) { in ts() argument
41 return new Date(time) + " (" + time + ")"; in ts()
50 protected static void dumpUpcomingTime(PrintWriter pw, String var, long time, long now) { in dumpUpcomingTime() argument
52 if (time > 0) { in dumpUpcomingTime()
53 pw.printf("%s, in %s, now=%s", ts(time), formatDuration(time - now), ts(now)); in dumpUpcomingTime()
55 pw.print(time); in dumpUpcomingTime()
/frameworks/av/media/libaaudio/examples/utils/
DAAudioExampleUtils.h111 void convertNanosecondsToTimespec(int64_t nanoseconds, struct timespec *time) { in convertNanosecondsToTimespec() argument
112 time->tv_sec = nanoseconds / NANOS_PER_SECOND; in convertNanosecondsToTimespec()
114 time->tv_nsec = nanoseconds - (time->tv_sec * NANOS_PER_SECOND); in convertNanosecondsToTimespec()
119 struct timespec time; variable
120 int result = clock_gettime(clockId, &time);
124 return (time.tv_sec * NANOS_PER_SECOND) + time.tv_nsec;
177 android::status_t futex_wait(void *addr, int current, struct timespec *time) { in futex_wait() argument
179 return sys_futex(addr, FUTEX_WAIT_PRIVATE, current, time, NULL, 0); in futex_wait()
202 struct timespec time; in wait() local
203 convertNanosecondsToTimespec(timeoutNanoseconds, &time); in wait()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DClientWakelockAccountant.java41 int token, int concurrentRequests, long time) { in startAttributingWakelock() argument
43 RilWakelockInfo wlInfo = new RilWakelockInfo(request, token, concurrentRequests, time); in startAttributingWakelock()
50 public void stopAttributingWakelock(int request, int token, long time) { in stopAttributingWakelock() argument
53 completeRequest(wlInfo, time); in stopAttributingWakelock()
58 public void stopAllPendingRequests(long time) { in stopAllPendingRequests() argument
61 completeRequest(wlInfo, time); in stopAllPendingRequests()
68 public void changeConcurrentRequests(int concurrentRequests, long time) { in changeConcurrentRequests() argument
71 wlInfo.updateConcurrentRequests(concurrentRequests, time); in changeConcurrentRequests()
76 private void completeRequest(RilWakelockInfo wlInfo, long time) { in completeRequest() argument
77 wlInfo.setResponseTime(time); in completeRequest()
DCall.java237 long time = Long.MAX_VALUE; in getEarliestConnection() local
253 if (t < time) { in getEarliestConnection()
255 time = t; in getEarliestConnection()
265 long time = Long.MAX_VALUE; in getEarliestCreateTime() local
279 time = t < time ? t : time; in getEarliestCreateTime()
282 return time; in getEarliestCreateTime()
287 long time = Long.MAX_VALUE;
300 time = t < time ? t : time;
303 return time;
329 long time = 0;
[all …]
/frameworks/base/core/java/android/util/
DTimeUtils.java33 import java.time.Instant;
34 import java.time.LocalTime;
357 public static void formatDuration(long time, long now, StringBuilder sb) { in formatDuration() argument
358 if (time == 0) { in formatDuration()
362 formatDuration(time-now, sb, 0); in formatDuration()
366 public static void formatDuration(long time, long now, PrintWriter pw) { in formatDuration() argument
367 if (time == 0) { in formatDuration()
371 formatDuration(time-now, pw, 0); in formatDuration()
375 public static String formatUptime(long time) { in formatUptime() argument
376 return formatTime(time, SystemClock.uptimeMillis()); in formatUptime()
[all …]
/frameworks/base/core/java/android/app/timedetector/
DITimeDetectorService.aidl19 import android.app.time.ExternalTimeSuggestion;
20 import android.app.time.ITimeDetectorListener;
21 import android.app.time.TimeCapabilitiesAndConfig;
22 import android.app.time.TimeConfiguration;
23 import android.app.time.TimeState;
24 import android.app.time.UnixEpochTime;
50 boolean confirmTime(in UnixEpochTime time); in confirmTime() argument
/frameworks/ex/common/java/com/android/common/
DOperationScheduler.java170 long time = triggerTimeMillis; in getNextTimeMillis() local
172 time = Math.min(time, lastSuccessTimeMillis + options.periodicIntervalMillis); in getNextTimeMillis()
175 time = Math.max(time, moratoriumTimeMillis); in getNextTimeMillis()
176 time = Math.max(time, lastSuccessTimeMillis + options.minTriggerMillis); in getNextTimeMillis()
189 time = Math.max(time, lastErrorTimeMillis + backoff); in getNextTimeMillis()
191 return time; in getNextTimeMillis()
225 long time = mStorage.getLong(name, 0); in getTimeBefore() local
226 if (time > max) { in getTimeBefore()
227 time = max; in getTimeBefore()
228 SharedPreferencesCompat.apply(mStorage.edit().putLong(name, time)); in getTimeBefore()
[all …]
/frameworks/base/core/tests/benchmarks/src/android/text/format/
DAndroidTimeVsOthersBenchmark.java21 import java.time.LocalDateTime;
22 import java.time.ZoneId;
23 import java.time.ZoneOffset;
38 Time time = new Time(timezoneId); in toMillis_androidTime() local
39 time.set(1, 2, 3, 4, 5, 2010); in toMillis_androidTime()
40 answer = time.toMillis(false); in toMillis_androidTime()
50 LocalDateTime time = LocalDateTime.of(2010, 5 + 1, 4, 3, 2, 1); in toMillis_javaTime() local
51 ZoneOffset offset = ZoneId.of(timezoneId).getRules().getOffset(time); in toMillis_javaTime()
52 answer = time.toInstant(offset).toEpochMilli(); in toMillis_javaTime()
/frameworks/base/services/core/java/com/android/server/power/
DWakeLockLog.java231 final long time = mInjector.currentTimeMillis(); in onWakeLockEvent() local
236 time); in onWakeLockEvent()
248 long time) { in handleWakeLockEventInternal() argument
252 mLog.addEntry(new LogEntry(time, eventType, tagData, flags)); in handleWakeLockEventInternal()
372 public long time; field in WakeLockLog.LogEntry
386 LogEntry(long time, int type, TagData tag, int flags) { in LogEntry() argument
387 set(time, type, tag, flags); in LogEntry()
399 public void set(long time, int type, TagData tag, int flags) { in set() argument
400 this.time = time; in set()
437 return dateFormat.format(new Date(time)) + " - RESET"; in toStringInternal()
[all …]
/frameworks/base/telephony/java/android/telephony/
DTelephonyHistogram.java170 private void addToBucketCounter(int[] bucketEndPoints, int[] bucketCounters, int time) { in addToBucketCounter() argument
173 if (time <= bucketEndPoints[i]) { in addToBucketCounter()
194 public void addTimeTaken(int time) { in addTimeTaken() argument
199 mMinTimeMs = time; in addTimeTaken()
200 mMaxTimeMs = time; in addTimeTaken()
201 mAverageTimeMs = time; in addTimeTaken()
207 mInitialTimings[0] = time; in addTimeTaken()
211 if (time < mMinTimeMs) { in addTimeTaken()
212 mMinTimeMs = time; in addTimeTaken()
214 if (time > mMaxTimeMs) { in addTimeTaken()
[all …]
/frameworks/rs/tests/java_api/ImageProcessing_jb/src/com/android/rs/image/
DResult.java30 public void add(float time) { in add() argument
31 timeList.add(time); in add()
37 for (float time : timeList) { in getTotalTime()
38 total += time; in getTotalTime()
57 for (float time : timeList) { in getStdevp()
58 float diff = time - avg; in getStdevp()
/frameworks/rs/tests/java_api/RsTest_14/src/com/android/rs/test/
Dfp_mad.rscript27 float time = end(index);
28 rsDebug("fp_mad4 M ops", 1000.f / time);
50 float time = end(index);
51 rsDebug("fp_mad M ops", 1000.f / time);
64 float time = end(index);
65 rsDebug("fp_norm M ops", 10.f / time);
78 float time = end(index);
79 rsDebug("fp_sincos4 M ops", 10.f / time);
92 float time = end(index);
93 rsDebug("fp_sincos M ops", 10.f / time);
[all …]
/frameworks/rs/tests/java_api/RsTest_11/src/com/android/rs/test/
Dfp_mad.rscript27 float time = end(index);
28 rsDebug("fp_mad4 M ops", 1000.f / time);
50 float time = end(index);
51 rsDebug("fp_mad M ops", 1000.f / time);
64 float time = end(index);
65 rsDebug("fp_norm M ops", 10.f / time);
78 float time = end(index);
79 rsDebug("fp_sincos4 M ops", 10.f / time);
92 float time = end(index);
93 rsDebug("fp_sincos M ops", 10.f / time);
[all …]

12345678910>>...59