Home
last modified time | relevance | path

Searched refs:Duration (Results 1 – 25 of 321) sorted by relevance

12345678910>>...13

/frameworks/base/services/tests/mockingservicestests/src/com/android/server/utils/quota/
DMultiRateLimiterTest.java29 import java.time.Duration;
46 Duration mElapsedTime = Duration.ZERO;
62 .addRateLimit(3, Duration.ofSeconds(20)) in testSingleRateLimit_belowLimit_isWithinQuota()
66 mInjector.mElapsedTime = Duration.ZERO; in testSingleRateLimit_belowLimit_isWithinQuota()
70 mInjector.mElapsedTime = Duration.ofMillis(50); in testSingleRateLimit_belowLimit_isWithinQuota()
74 mInjector.mElapsedTime = Duration.ofMillis(100); in testSingleRateLimit_belowLimit_isWithinQuota()
81 .addRateLimit(3, Duration.ofSeconds(20)) in testSingleRateLimit_aboveLimit_isNotWithinQuota()
84 mInjector.mElapsedTime = Duration.ZERO; in testSingleRateLimit_aboveLimit_isNotWithinQuota()
87 mInjector.mElapsedTime = Duration.ofMillis(50); in testSingleRateLimit_aboveLimit_isNotWithinQuota()
90 mInjector.mElapsedTime = Duration.ofMillis(100); in testSingleRateLimit_aboveLimit_isNotWithinQuota()
[all …]
/frameworks/native/services/surfaceflinger/Scheduler/include/scheduler/
DTime.h34 struct Duration;
38 explicit constexpr TimePoint(const Duration&);
51 struct Duration : TimePoint::duration { struct
54 constexpr Duration(std::chrono::duration<R, P> d) : TimePoint::duration(d) {} in Duration() function
56 static constexpr Duration fromNs(nsecs_t ns) { return {std::chrono::nanoseconds(ns)}; } in fromNs() argument
61 using Period = Duration; argument
63 constexpr TimePoint::TimePoint(const Duration& d) : scheduler::SchedulerClock::time_point(d) {} in TimePoint()
66 return TimePoint(Duration::fromNs(ns)); in fromNs()
70 return Duration(time_since_epoch()).ns(); in ns()
78 template <typename Period, typename Rep = Duration::rep>
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/
DDuration.java30 public class Duration implements Parcelable { class
56 public Duration(int timeInterval, TimeUnit timeUnit) { in Duration() method in Duration
61 private Duration(Parcel in) { in Duration() method in Duration
77 public static final Parcelable.Creator<Duration> CREATOR = new Parcelable.Creator<Duration>() {
79 public Duration createFromParcel(Parcel in) {
80 return new Duration(in);
84 public Duration[] newArray(int size) {
85 return new Duration[size];
/frameworks/base/services/core/java/com/android/server/timezonedetector/location/
DTimeZoneProviderRequest.java22 import java.time.Duration;
40 private final Duration mInitializationTimeout;
43 private final Duration mEventFilteringAgeThreshold;
46 boolean sendUpdates, @Nullable Duration initializationTimeout, in TimeZoneProviderRequest()
47 @Nullable Duration eventFilteringAgeThreshold) { in TimeZoneProviderRequest()
55 @NonNull Duration initializationTimeout, in createStartUpdatesRequest()
56 @NonNull Duration eventFilteringAgeThreshold) { in createStartUpdatesRequest()
82 public Duration getInitializationTimeout() { in getInitializationTimeout()
93 public Duration getEventFilteringAgeThreshold() { in getEventFilteringAgeThreshold()
DLocationTimeZoneProviderControllerEnvironmentImpl.java27 import java.time.Duration;
67 Duration getProviderInitializationTimeout() { in getProviderInitializationTimeout()
73 Duration getProviderInitializationTimeoutFuzz() { in getProviderInitializationTimeoutFuzz()
79 Duration getUncertaintyDelay() { in getUncertaintyDelay()
84 Duration getProviderEventFilteringAgeThreshold() { in getProviderEventFilteringAgeThreshold()
/frameworks/base/services/tests/timetests/src/com/android/server/timezonedetector/location/
DLocationTimeZoneProviderTest.java51 import java.time.Duration;
108 Duration arbitraryInitializationTimeout = Duration.ofMinutes(5); in lifecycle()
109 Duration arbitraryInitializationTimeoutFuzz = Duration.ofMinutes(2); in lifecycle()
110 Duration arbitraryEventFilteringAgeThreshold = Duration.ofMinutes(3); in lifecycle()
124 Duration expectedInitializationTimeout = in lifecycle()
212 Duration arbitraryInitializationTimeout = Duration.ofMinutes(5); in stateRecording()
213 Duration arbitraryInitializationTimeoutFuzz = Duration.ofMinutes(2); in stateRecording()
214 Duration eventFilteringAgeThreshold = Duration.ofMinutes(3); in stateRecording()
256 Duration arbitraryInitializationTimeout = Duration.ofMinutes(5); in entersUncertainState_whenEventHasUnsupportedZones()
257 Duration arbitraryInitializationTimeoutFuzz = Duration.ofMinutes(2); in entersUncertainState_whenEventHasUnsupportedZones()
[all …]
DHandlerThreadingDomainTest.java33 import java.time.Duration;
129 Duration executionDelay = Duration.ofSeconds(5); in postDelayed()
149 Duration actualExecutionDelay = in postDelayed()
150 Duration.ofNanos(executionNanosHolder.get() - beforeExecutionNanos); in postDelayed()
155 Duration postDuration = Duration.ofNanos(afterPostNanos - beforeExecutionNanos); in postDelayed()
159 Duration delayBeforeExecuted = Duration.ofNanos(afterWaitNanos - beforeExecutionNanos); in postDelayed()
167 Duration workDuration = Duration.ofSeconds(5); in postAndWait()
183 Duration waitDuration = Duration.ofNanos(afterExecutionNanos - beforeExecutionNanos); in postAndWait()
/frameworks/base/services/tests/selinux/src/com/android/server/selinux/
DRateLimiterTest.java27 import java.time.Duration;
37 RateLimiter rateLimiter = new RateLimiter(mMockClock, Duration.ofSeconds(1)); in testRateLimiter_1QPS()
44 mMockClock.currentTimeMillis += Duration.ofSeconds(1).toMillis(); in testRateLimiter_1QPS()
53 Duration.ofSeconds(1).dividedBy(3).truncatedTo(ChronoUnit.MILLIS)); in testRateLimiter_3QPS()
56 mMockClock.currentTimeMillis += Duration.ofSeconds(1).dividedBy(2).toMillis(); in testRateLimiter_3QPS()
58 mMockClock.currentTimeMillis += Duration.ofSeconds(1).dividedBy(3).toMillis(); in testRateLimiter_3QPS()
60 mMockClock.currentTimeMillis += Duration.ofSeconds(1).dividedBy(4).toMillis(); in testRateLimiter_3QPS()
66 RateLimiter rateLimiter = new RateLimiter(mMockClock, Duration.ofMillis(0)); in testRateLimiter_infiniteQPS()
75 mMockClock.currentTimeMillis += Duration.ofSeconds(10).toMillis(); in testRateLimiter_infiniteQPS()
83 mMockClock.currentTimeMillis += Duration.ofDays(-10).toMillis(); in testRateLimiter_infiniteQPS()
[all …]
/frameworks/native/services/surfaceflinger/DisplayHardware/
DPowerAdvisor.h66 virtual void updateTargetWorkDuration(Duration targetDuration) = 0;
95 virtual void setFrameDelay(Duration frameDelayDuration) = 0;
103 virtual void setTotalFrameTargetWorkDuration(Duration targetDuration) = 0;
128 void updateTargetWorkDuration(Duration targetDuration) override;
143 void setFrameDelay(Duration frameDelayDuration) override;
147 void setTotalFrameTargetWorkDuration(Duration targetDuration) override;
174 Duration hwcPresentDelayDuration{0ns};
179 Duration postPresentFenceHwcPresentDuration{0ns};
185 Duration duration{0ns};
236 Duration combineTimingEstimates(Duration totalDuration, Duration flingerDuration);
[all …]
/frameworks/base/core/tests/vibrator/src/android/os/
DVibrationEffectTest.java51 import java.time.Duration;
340 .addOffDuration(Duration.ofMillis(20)) in computeLegacyPattern_composition_withOffDuration()
351 .addOffDuration(Duration.ofMillis(10)) in computeLegacyPattern_composition_withOffDuration()
356 .addOffDuration(Duration.ofMillis(5)) in computeLegacyPattern_composition_withOffDuration()
367 .addOffDuration(Duration.ofMillis(20)) in computeLegacyPattern_composition_withPrimitives()
398 .addTransition(Duration.ofMillis(100), targetAmplitude(1), targetFrequency(120)) in computeLegacyPattern_effectsViaStartWaveform()
399 .addSustain(Duration.ofMillis(200)) in computeLegacyPattern_effectsViaStartWaveform()
400 .addTransition(Duration.ofMillis(100), targetAmplitude(0), targetFrequency(60)) in computeLegacyPattern_effectsViaStartWaveform()
406 .addTransition(Duration.ofMillis(80), targetAmplitude(1)) in computeLegacyPattern_effectsViaStartWaveform()
407 .addSustain(Duration.ofMillis(200)) in computeLegacyPattern_effectsViaStartWaveform()
[all …]
/frameworks/native/services/surfaceflinger/Scheduler/tests/
DPresentLatencyTrackerTest.cpp31 EXPECT_EQ(tracker.trackPendingFrame(kCompositeTime, FenceTime::NO_FENCE), Duration::zero()); in TEST()
32 EXPECT_EQ(tracker.trackPendingFrame(kCompositeTime, FenceTime::NO_FENCE), Duration::zero()); in TEST()
33 EXPECT_EQ(tracker.trackPendingFrame(kCompositeTime, FenceTime::NO_FENCE), Duration::zero()); in TEST()
37 EXPECT_EQ(tracker.trackPendingFrame(kCompositeTime, fenceTime), Duration::zero()); in TEST()
42 Duration::fromNs(9000)); in TEST()
56 EXPECT_EQ(tracker.trackPendingFrame(kCompositeTime, fenceTime), Duration::zero()); in TEST()
68 constexpr Duration kPresentLatency = Duration::fromNs(static_cast<nsecs_t>(kPresentCount) - 1); in TEST()
/frameworks/av/media/utils/include/mediautils/
DTimeCheck.h33 using Duration = std::chrono::steady_clock::duration;
48 static constexpr TimeCheck::Duration kDefaultTimeoutDuration = std::chrono::milliseconds(3000);
56 static constexpr TimeCheck::Duration kDefaultSecondChanceDuration =
87 Duration requestedTimeoutDuration, Duration secondChanceDuration,
108 Duration _timeoutDuration, Duration _secondChanceDuration, in TimeCheckHandler()
122 const Duration timeoutDuration;
123 const Duration secondChanceDuration;
/frameworks/base/core/tests/coretests/src/android/net/sntp/
DDuration64Test.java31 import java.time.Duration;
52 assertEquals(Duration.ofNanos(expectedNanos), in testBetween_rangeChecks()
54 assertEquals(Duration.ofNanos(-expectedNanos), in testBetween_rangeChecks()
68 Duration.ofNanos(expectedNanos), in testBetween_rangeChecks()
73 Duration.ofNanos(-expectedNanos - 1), in testBetween_rangeChecks()
81 assertEquals(Duration.ofNanos(expectedNanos), in testBetween_smallSecondsOnly()
85 assertEquals(Duration.ofNanos(-expectedNanos), in testBetween_smallSecondsOnly()
98 assertEquals(Duration.ofNanos(expectedNanos), in testBetween_smallSecondsAndFraction()
102 assertEquals(Duration.ofNanos(-expectedNanos), in testBetween_smallSecondsAndFraction()
113 assertEquals(Duration.ofNanos(expectedNanos), in testBetween_smallSecondsAndFraction()
[all …]
/frameworks/base/services/core/java/com/android/server/selinux/
DQuotaLimiter.java21 import java.time.Duration;
36 private final Duration mWindowSize;
43 QuotaLimiter(Clock clock, Duration windowSize, int maxPermits) { in QuotaLimiter()
49 public QuotaLimiter(Duration windowSize, int maxPermits) { in QuotaLimiter()
54 this(Clock.SYSTEM_CLOCK, Duration.ofDays(1), maxPermitsPerDay); in QuotaLimiter()
64 Duration.between(Instant.EPOCH, Instant.ofEpochMilli(mClock.currentTimeMillis())) in acquire()
/frameworks/base/core/java/android/net/sntp/
DDuration64.java18 import java.time.Duration;
59 public Duration plus(Duration64 other) { in plus()
83 public static Duration64 fromDuration(Duration duration) { in fromDuration()
98 public Duration toDuration() { in toDuration()
101 return Duration.ofSeconds(seconds, nanos); in toDuration()
123 Duration duration = toDuration(); in toString()
/frameworks/base/core/java/android/os/
DParcelDuration.java21 import java.time.Duration;
39 this(Duration.ofMillis(ms)); in ParcelDuration()
47 public ParcelDuration(@NonNull Duration duration) { in ParcelDuration()
74 public Duration getDuration() { in getDuration()
75 return Duration.ofSeconds(mSeconds, mNanos); in getDuration()
/frameworks/native/services/surfaceflinger/tests/unittests/
DPowerAdvisorTest.cpp50 void fakeBasicFrameTiming(TimePoint startTime, Duration vsyncPeriod);
51 void setExpectedTiming(Duration totalFrameTargetDuration, TimePoint expectedPresentTime);
52 Duration getFenceWaitDelayDuration(bool skipValidate);
53 Duration getErrorMargin();
57 int64_t toNanos(Duration d);
61 Duration frame1GpuFenceDuration;
62 Duration frame2GpuFenceDuration;
63 Duration vsyncPeriod;
64 Duration presentDuration = 0ms;
65 Duration postCompDuration = 0ms;
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DKernelCpuThreadReaderEndToEndTest.java38 import java.time.Duration;
78 final Duration targetDuration = Duration.ofMillis(millis); in testTimedWork()
80 Duration resultDuration = getAverageWorkTime( in testTimedWork()
98 final Duration lowResultDuration = in testIterativeWork()
100 final Duration highResultDuration = in testIterativeWork()
113 private Duration getAverageWorkTime( in getAverageWorkTime()
160 return Duration.ofMillis((long) averageWorkTimeMillis.getAsDouble()); in getAverageWorkTime()
166 private Runnable timedWork(Duration duration) { in timedWork()
/frameworks/base/tests/Input/src/com/android/test/input/
DMotionPredictorTest.kt43 import java.time.Duration
46 eventTime: Duration, in getStylusMotionEvent()
70 private fun getPredictionContext(offset: Duration, enablePrediction: Boolean): Context { in getPredictionContext()
114 /*offset=*/Duration.ofMillis(1), /*enablePrediction=*/true) in testPredictedCoordinatesAndTime()
116 var eventTime = Duration.ofMillis(0) in testPredictedCoordinatesAndTime()
121 eventTime += Duration.ofMillis(4) in testPredictedCoordinatesAndTime()
126 val predicted = predictor.predict(Duration.ofMillis(8).toNanos()) in testPredictedCoordinatesAndTime()
/frameworks/base/services/core/java/com/android/server/timezonedetector/
DServiceConfigAccessor.java28 import java.time.Duration;
214 Duration getLocationTimeZoneProviderInitializationTimeout(); in getLocationTimeZoneProviderInitializationTimeout()
221 Duration getLocationTimeZoneProviderInitializationTimeoutFuzz(); in getLocationTimeZoneProviderInitializationTimeoutFuzz()
228 Duration getLocationTimeZoneUncertaintyDelay(); in getLocationTimeZoneUncertaintyDelay()
235 Duration getLocationTimeZoneProviderEventFilteringAgeThreshold(); in getLocationTimeZoneProviderEventFilteringAgeThreshold()
/frameworks/libs/modules-utils/javatests/com/android/modules/utils/
DSynchronousResultReceiverTest.java27 import java.time.Duration;
33 private static final Duration OK_TIME = Duration.ofMillis(100);
34 private static final Duration NEG_TIME = Duration.ofSeconds(-1);
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/ui/
DKeyguardTransitionAnimationFlow.kt35 import kotlin.time.Duration in <lambda>()
36 import kotlin.time.Duration.Companion.milliseconds in <lambda>()
55 duration: Duration, in <lambda>()
62 private val transitionDuration: Duration, in <lambda>()
77 duration: Duration, in <lambda>()
79 startTime: Duration = 0.milliseconds, in <lambda>()
109 duration: Duration, in <lambda>()
111 startTime: Duration = 0.milliseconds, in <lambda>()
/frameworks/base/apct-tests/perftests/core/src/android/input/
DMotionPredictorBenchmark.kt40 import java.time.Duration
43 eventTime: Duration, in getStylusMotionEvent()
95 val offset = Duration.ofMillis(20) in timeRecordAndPredict()
96 var eventTime = Duration.ofMillis(0) in timeRecordAndPredict()
97 val eventInterval = Duration.ofMillis(4) // 240 Hz in timeRecordAndPredict()
128 val offsetNanos = Duration.ofMillis(20).toNanos().toInt() in timeCreatePredictor()
/frameworks/base/tests/CompanionDeviceMultiDeviceTests/client/src/android/companion/multidevices/bluetooth/
DBluetoothController.kt29 import kotlin.time.Duration
30 import kotlin.time.Duration.Companion.seconds
67 fun becomeDiscoverable(duration: Duration = 15.seconds) { in becomeDiscoverable()
87 interval: Duration = 1.seconds, in waitFor()
88 timeout: Duration = 5.seconds, in waitFor()
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/
DBlockingQueueEventVerifier.kt21 import java.time.Duration
30 private fun <T> getEvent(queue: BlockingQueue<T>, timeout: Duration): T? { in getEvent()
41 val event = getEvent(queue, Duration.ofMillis(50)) in assertNoEvents()
46 val event = getEvent(queue, Duration.ofMillis(DEFAULT_DISPATCHING_TIMEOUT_MILLIS.toLong())) in getMotionEvent()

12345678910>>...13