Home
last modified time | relevance | path

Searched refs:duration (Results 1 – 25 of 2143) sorted by relevance

12345678910>>...86

/external/protobuf/java/util/src/main/java/com/google/protobuf/util/
DDurations.java114 public static boolean isValid(Duration duration) { in isValid() argument
115 return isValid(duration.getSeconds(), duration.getNanos()); in isValid()
144 public static boolean isNegative(Duration duration) { in isNegative() argument
145 checkValid(duration); in isNegative()
146 return (duration.getSeconds() == 0) ? duration.getNanos() < 0 : duration.getSeconds() < 0; in isNegative()
156 public static Duration checkNotNegative(Duration duration) { in checkNotNegative() argument
157 checkValid(duration); in checkNotNegative()
158 checkArgument(!isNegative(duration), "duration (%s) must not be negative", toString(duration)); in checkNotNegative()
159 return duration; in checkNotNegative()
169 public static Duration checkPositive(Duration duration) { in checkPositive() argument
[all …]
DTimeUtil.java107 public static String toString(Duration duration) { in toString() argument
108 return Durations.toString(duration); in toString()
165 public static long toMillis(Duration duration) { in toMillis() argument
166 return Durations.toMillis(duration); in toMillis()
211 public static long toMicros(Duration duration) { in toMicros() argument
212 return Durations.toMicros(duration); in toMicros()
251 public static long toNanos(Duration duration) { in toNanos() argument
252 return Durations.toNanos(duration); in toNanos()
329 public static Duration multiply(Duration duration, double times) { in multiply() argument
330 double result = duration.getSeconds() * times + duration.getNanos() * times / 1000000000.0; in multiply()
[all …]
/external/protobuf/java/util/src/test/java/com/google/protobuf/util/
DTimeUtilTest.java243 Duration duration = TimeUtil.distance(start, end); in testDurationStringFormat() local
244 assertEquals("315537897599.999999999s", TimeUtil.toString(duration)); in testDurationStringFormat()
245 duration = TimeUtil.distance(end, start); in testDurationStringFormat()
246 assertEquals("-315537897599.999999999s", TimeUtil.toString(duration)); in testDurationStringFormat()
249 duration = Duration.newBuilder().setSeconds(1).build(); in testDurationStringFormat()
250 assertEquals("1s", TimeUtil.toString(duration)); in testDurationStringFormat()
251 duration = Duration.newBuilder().setNanos(10000000).build(); in testDurationStringFormat()
252 assertEquals("0.010s", TimeUtil.toString(duration)); in testDurationStringFormat()
253 duration = Duration.newBuilder().setNanos(10000).build(); in testDurationStringFormat()
254 assertEquals("0.000010s", TimeUtil.toString(duration)); in testDurationStringFormat()
[all …]
/external/vogar/src/vogar/util/
DTimeUtilities.java27 public static String msToIsoString(long duration) { in msToIsoString() argument
28 long milliseconds = duration % 1000; in msToIsoString()
29 duration /= 1000; in msToIsoString()
30 long seconds = duration % 60; in msToIsoString()
31 duration /= 60; in msToIsoString()
32 long minutes = duration % 60; in msToIsoString()
33 duration /= 60; in msToIsoString()
34 long hours = duration; in msToIsoString()
74 long duration = ns; in nsToString() local
75 long nanoseconds = duration % 1000; in nsToString()
[all …]
/external/webrtc/talk/app/webrtc/
Ddtmfsender_unittest.cc77 DtmfInfo(int code, int duration, int gap) in DtmfInfo()
79 duration(duration), in DtmfInfo()
82 int duration; member
99 int duration) override { in InsertDtmf() argument
109 << " duration=" << duration in InsertDtmf()
111 dtmf_info_queue_.push_back(DtmfInfo(code, duration, gap)); in InsertDtmf()
159 void GetDtmfInfoFromString(const std::string& tones, int duration, in GetDtmfInfoFromString() argument
164 int extra_delay = -1 * (inter_tone_gap + duration); in GetDtmfInfoFromString()
174 dtmfs->push_back(FakeDtmfProvider::DtmfInfo(code, duration, in GetDtmfInfoFromString()
175 duration + inter_tone_gap + extra_delay)); in GetDtmfInfoFromString()
[all …]
/external/webrtc/webrtc/modules/audio_coding/neteq/
Ddtmf_buffer_unittest.cc32 static uint32_t MakeDtmfPayload(int event, bool end, int volume, int duration) { in MakeDtmfPayload() argument
42 payload |= (duration & 0xFFFF); in MakeDtmfPayload()
49 return (a.duration == b.duration in EqualEvents()
66 int duration = 4711; in TEST() local
68 uint32_t payload = MakeDtmfPayload(event_no, end_bit, volume, duration); in TEST()
74 EXPECT_EQ(duration, event.duration); in TEST()
88 int duration = 4711; in TEST() local
90 DtmfEvent event(timestamp, event_no, volume, duration, end_bit); in TEST()
106 EXPECT_TRUE(buffer.GetEvent(timestamp + duration / 2, &out_event)); in TEST()
112 EXPECT_TRUE(buffer.GetEvent(timestamp + duration + 10, &out_event)); in TEST()
[all …]
/external/libcxx/test/std/utilities/time/time.traits/time.traits.specializations/
Dduration.pass.cpp30 test<std::chrono::duration<int, std::ratio<1, 100> >, in main()
31 std::chrono::duration<long, std::ratio<1, 1000> >, in main()
32 std::chrono::duration<long, std::ratio<1, 1000> > >(); in main()
33 test<std::chrono::duration<long, std::ratio<1, 100> >, in main()
34 std::chrono::duration<int, std::ratio<1, 1000> >, in main()
35 std::chrono::duration<long, std::ratio<1, 1000> > >(); in main()
36 test<std::chrono::duration<char, std::ratio<1, 30> >, in main()
37 std::chrono::duration<short, std::ratio<1, 1000> >, in main()
38 std::chrono::duration<int, std::ratio<1, 3000> > >(); in main()
39 test<std::chrono::duration<double, std::ratio<21, 1> >, in main()
[all …]
Dtime_point.pass.cpp34 test<std::chrono::duration<int, std::ratio<1, 100> >, in main()
35 std::chrono::duration<long, std::ratio<1, 1000> >, in main()
36 std::chrono::duration<long, std::ratio<1, 1000> > >(); in main()
37 test<std::chrono::duration<long, std::ratio<1, 100> >, in main()
38 std::chrono::duration<int, std::ratio<1, 1000> >, in main()
39 std::chrono::duration<long, std::ratio<1, 1000> > >(); in main()
40 test<std::chrono::duration<char, std::ratio<1, 30> >, in main()
41 std::chrono::duration<short, std::ratio<1, 1000> >, in main()
42 std::chrono::duration<int, std::ratio<1, 3000> > >(); in main()
43 test<std::chrono::duration<double, std::ratio<21, 1> >, in main()
[all …]
/external/perfetto/test/trace_processor/
Dgpu_render_stages.py24 ts=0, event_id=0, duration=5, hw_queue_id=1, stage_id=1, context=0)
49 ts=0, event_id=0, duration=5, hw_queue_id=0, stage_id=0, context=42)
51 ts=10, event_id=1, duration=5, hw_queue_id=1, stage_id=1, context=42)
53 ts=20, event_id=2, duration=5, hw_queue_id=2, stage_id=2, context=42)
55 ts=30, event_id=3, duration=5, hw_queue_id=0, stage_id=3, context=42)
58 ts=40, event_id=3, duration=5, hw_queue_id=3, stage_id=4, context=42)
65 duration=5,
74 duration=5,
86 duration=5,
100 ts=80, event_id=8, duration=5, hw_queue_id=0, stage_id=2, context=42)
[all …]
Dgraphics_frame_events.py38 …s=1, buffer_id=1, layer_name="layer1", frame_number=11, event_type=BufferEvent.DEQUEUE, duration=0)
39 …(ts=4, buffer_id=1, layer_name="layer1", frame_number=11, event_type=BufferEvent.QUEUE, duration=0)
40 …uffer_id=1, layer_name="layer1", frame_number=11, event_type=BufferEvent.ACQUIRE_FENCE, duration=0)
41 …(ts=8, buffer_id=1, layer_name="layer1", frame_number=11, event_type=BufferEvent.LATCH, duration=0)
42 …uffer_id=1, layer_name="layer1", frame_number=11, event_type=BufferEvent.PRESENT_FENCE, duration=0)
44 …s=6, buffer_id=2, layer_name="layer2", frame_number=12, event_type=BufferEvent.DEQUEUE, duration=0)
45 …uffer_id=2, layer_name="layer2", frame_number=12, event_type=BufferEvent.ACQUIRE_FENCE, duration=0)
46 …(ts=9, buffer_id=2, layer_name="layer2", frame_number=12, event_type=BufferEvent.QUEUE, duration=0)
47 …ts=11, buffer_id=2, layer_name="layer2", frame_number=12, event_type=BufferEvent.LATCH, duration=0)
48 …uffer_id=2, layer_name="layer2", frame_number=12, event_type=BufferEvent.PRESENT_FENCE, duration=0)
[all …]
/external/Reactive-Extensions/RxCpp/Rx/v2/test/operators/
Ddistinct.cpp366 const rxsc::test::messages<system_clock::duration> on;
369 on.next(150, system_clock::duration{ 10 }),
370 on.next(210, system_clock::duration{ 20 }),
371 on.next(220, system_clock::duration{ 20 }),
372 on.next(230, system_clock::duration{ 100 }),
373 on.next(240, system_clock::duration{ 100 }),
389 on.next(210, system_clock::duration{ 20 }),
390 on.next(230, system_clock::duration{ 100 }),
414 const rxsc::test::messages<high_resolution_clock::duration> on;
417 on.next(150, high_resolution_clock::duration{ 10 }),
[all …]
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowOverScroller.java17 private long duration; field in ShadowOverScroller
33 return dt >= duration ? finalX : startX + (int) ((deltaX() * dt) / duration); in getCurrX()
39 return dt >= duration ? finalY : startY + (int) ((deltaY() * dt) / duration); in getCurrY()
54 return (int) duration; in getDuration()
58 protected void startScroll(int startX, int startY, int dx, int dy, int duration) { in startScroll() argument
64 this.duration = duration; in startScroll()
72 }, duration); in startScroll()
77 duration = deltaTime() - 1; in abortAnimation()
88 duration = deltaTime() - 1; in forceFinished()
96 started &= deltaTime() < duration; in computeScrollOffset()
[all …]
DShadowScroller.java14 private long duration; field in ShadowScroller
30 return dt >= duration ? finalX : startX + (int) ((deltaX() * dt) / duration); in getCurrX()
36 return dt >= duration ? finalY : startY + (int) ((deltaY() * dt) / duration); in getCurrY()
51 return (int) duration; in getDuration()
55 protected void startScroll(int startX, int startY, int dx, int dy, int duration) { in startScroll() argument
61 this.duration = duration; in startScroll()
69 }, duration); in startScroll()
77 started &= deltaTime() < duration; in computeScrollOffset()
83 return deltaTime() > duration;
/external/exoplayer/tree/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/
DSegmentBase.java118 /* package */ final long duration; field in SegmentBase.MultiSegmentBase
140 long duration, in MultiSegmentBase() argument
144 this.duration = duration; in MultiSegmentBase()
157 long durationUs = (duration * C.MICROS_PER_SECOND) / timescale; in getSegmentNum()
185 long duration = segmentTimeline.get((int) (sequenceNumber - startNumber)).duration; in getSegmentDurationUs() local
186 return (duration * C.MICROS_PER_SECOND) / timescale; in getSegmentDurationUs()
192 : ((duration * C.MICROS_PER_SECOND) / timescale); in getSegmentDurationUs()
204 unscaledSegmentTime = (sequenceNumber - startNumber) * duration; in getSegmentTimeUs()
261 long duration, in SegmentList() argument
264 super(initialization, timescale, presentationTimeOffset, startNumber, duration, in SegmentList()
[all …]
/external/glide/library/src/main/java/com/bumptech/glide/request/animation/
DDrawableCrossFadeFactory.java25 private final int duration; field in DrawableCrossFadeFactory
32 public DrawableCrossFadeFactory(int duration) { in DrawableCrossFadeFactory() argument
33 this(new ViewAnimationFactory<T>(new DefaultAnimationFactory()), duration); in DrawableCrossFadeFactory()
36 public DrawableCrossFadeFactory(Context context, int defaultAnimationId, int duration) { in DrawableCrossFadeFactory() argument
37 this(new ViewAnimationFactory<T>(context, defaultAnimationId), duration); in DrawableCrossFadeFactory()
40 public DrawableCrossFadeFactory(Animation defaultAnimation, int duration) { in DrawableCrossFadeFactory() argument
41 this(new ViewAnimationFactory<T>(defaultAnimation), duration); in DrawableCrossFadeFactory()
44 DrawableCrossFadeFactory(ViewAnimationFactory<T> animationFactory, int duration) { in DrawableCrossFadeFactory() argument
46 this.duration = duration; in DrawableCrossFadeFactory()
57 animation = new DrawableCrossFadeViewAnimation<T>(defaultAnimation, duration); in build()
/external/kotlinx.coroutines/integration/kotlinx-coroutines-jdk8/test/time/
DDurationOverflowTest.kt16 private val durations = ChronoUnit.values().map { it.duration } in <lambda>()
21 for (duration in durations) { in <lambda>() variable
23 delay(duration.negated()) // Instant bail out from negative values in <lambda>()
26 delay(duration) in <lambda>()
36 for (duration in durations) { in testOnTimeout() method
39 onTimeout(duration) {} in testOnTimeout()
40 onTimeout(duration.negated()) {} in testOnTimeout()
47 for (duration in durations) { in <lambda>() method
48 withTimeout(duration) {} in <lambda>()
54 for (duration in durations) { in <lambda>() method
[all …]
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/stress/
DStressTest.java46 float duration = (time2 - time1) / 1000000; in testPerformance() local
47 System.out.println("Init was " + duration + " ms."); in testPerformance()
53 duration = (time2 - time1) / 1000000; in testPerformance()
54 System.out.println("\nSingle load was " + duration + " ms."); in testPerformance()
65 duration = ((time2 - time1) / 1000000) / (float) number; in testPerformance()
66 System.out.println("Duration for r=" + number + " was " + duration + " ms/load."); in testPerformance()
68 if (duration > 3) { in testPerformance()
69 System.err.println("!!!!!! Too long. Expected <1 but was " + duration); in testPerformance()
82 duration = ((time2 - time1) / 1000000) / (float) number; in testPerformance()
83 System.out.println("Duration for r=" + number + " was " + duration + " ms/load."); in testPerformance()
[all …]
/external/caliper/caliper/src/main/java/com/google/caliper/bridge/
DGcLogMessage.java38 private final ShortDuration duration; field in GcLogMessage
40 GcLogMessage(Type type, ShortDuration duration) { in GcLogMessage() argument
42 this.duration = checkNotNull(duration); in GcLogMessage()
49 public ShortDuration duration() { in duration() method in GcLogMessage
50 return duration; in duration()
60 return Objects.hashCode(type, duration); in hashCode()
70 && this.duration.equals(that.duration); in equals()
80 .add("duration", duration) in toString()
/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/
DBasicDurationFormatter.java11 package android.icu.impl.duration;
59 long duration = targetDate.getTime() - now;
60 return formatDurationFrom(duration, now);
64 public String formatDurationFromNow(long duration) {
65 return formatDurationFrom(duration, System.currentTimeMillis());
69 public String formatDurationFrom(long duration, long referenceDate) {
70 String s = doFallback(duration, referenceDate);
72 Period p = doBuild(duration, referenceDate);
107 protected String doFallback(long duration, long referenceDate) {
110 && Math.abs(duration) >= fallbackLimit) {
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/duration/
DBasicDurationFormatter.java10 package com.ibm.icu.impl.duration;
58 long duration = targetDate.getTime() - now;
59 return formatDurationFrom(duration, now);
63 public String formatDurationFromNow(long duration) {
64 return formatDurationFrom(duration, System.currentTimeMillis());
68 public String formatDurationFrom(long duration, long referenceDate) {
69 String s = doFallback(duration, referenceDate);
71 Period p = doBuild(duration, referenceDate);
106 protected String doFallback(long duration, long referenceDate) {
109 && Math.abs(duration) >= fallbackLimit) {
[all …]
DBasicPeriodBuilderFactory.java10 package com.ibm.icu.impl.duration;
14 import com.ibm.icu.impl.duration.impl.DataRecord;
15 import com.ibm.icu.impl.duration.impl.PeriodFormatterData;
16 import com.ibm.icu.impl.duration.impl.PeriodFormatterDataService;
161 Period createLimited(long duration, boolean inPast) { in createLimited() argument
164 if (duration * 1000 > maxLimit * maxUnitDuration) { in createLimited()
174 if (duration * 1000 < eml * emud) { in createLimited()
326 public Period create(long duration) { in create() argument
327 return createWithReferenceDate(duration, System.currentTimeMillis()); in create()
335 public Period createWithReferenceDate(long duration, long referenceDate) { in createWithReferenceDate() argument
[all …]
/external/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/
Dop_+.pass.cpp38 std::chrono::duration<int, std::ratio<2, 3> > s1(3); in main()
39 std::chrono::duration<int, std::ratio<3, 5> > s2(5); in main()
40 std::chrono::duration<int, std::ratio<1, 15> > r = s1 + s2; in main()
44 std::chrono::duration<int, std::ratio<2, 3> > s1(3); in main()
45 std::chrono::duration<double, std::ratio<3, 5> > s2(5); in main()
46 std::chrono::duration<double, std::ratio<1, 15> > r = s1 + s2; in main()
63 constexpr std::chrono::duration<int, std::ratio<2, 3> > s1(3); in main()
64 constexpr std::chrono::duration<int, std::ratio<3, 5> > s2(5); in main()
65 constexpr std::chrono::duration<int, std::ratio<1, 15> > r = s1 + s2; in main()
69 constexpr std::chrono::duration<int, std::ratio<2, 3> > s1(3); in main()
[all …]
Dop_-.pass.cpp39 std::chrono::duration<int, std::ratio<2, 3> > s1(3); in main()
40 std::chrono::duration<int, std::ratio<3, 5> > s2(5); in main()
41 std::chrono::duration<int, std::ratio<1, 15> > r = s1 - s2; in main()
45 std::chrono::duration<int, std::ratio<2, 3> > s1(3); in main()
46 std::chrono::duration<double, std::ratio<3, 5> > s2(5); in main()
47 std::chrono::duration<double, std::ratio<1, 15> > r = s1 - s2; in main()
64 constexpr std::chrono::duration<int, std::ratio<2, 3> > s1(3); in main()
65 constexpr std::chrono::duration<int, std::ratio<3, 5> > s2(5); in main()
66 constexpr std::chrono::duration<int, std::ratio<1, 15> > r = s1 - s2; in main()
70 constexpr std::chrono::duration<int, std::ratio<2, 3> > s1(3); in main()
[all …]
/external/autotest/site_utils/
Ddut_status_unittest.py42 def _check_duration(self, arguments, duration): argument
43 start_time = (arguments.until - duration * 3600)
84 duration = 4
85 duration_string = '%d' % duration
89 self._check_duration(arguments, duration)
106 duration = 4
107 duration_string = '%d' % duration
111 self._check_duration(arguments, duration)
117 duration = 4
118 duration_string = '%d' % duration
[all …]
/external/tensorflow/tensorflow/lite/experimental/ruy/
Dtime.h35 using Duration = InternalDefaultClock::duration;
40 std::chrono::duration<RepresentationType>(representation)); in DurationFromSeconds()
46 std::chrono::duration<RepresentationType, std::milli>(representation)); in DurationFromMilliseconds()
52 std::chrono::duration<RepresentationType, std::nano>(representation)); in DurationFromNanoseconds()
55 inline float ToFloatSeconds(const Duration& duration) { in ToFloatSeconds() argument
56 return std::chrono::duration_cast<std::chrono::duration<float>>(duration) in ToFloatSeconds()
60 inline std::int64_t ToInt64Nanoseconds(const Duration& duration) { in ToInt64Nanoseconds() argument
62 std::chrono::duration<std::int64_t, std::nano>>(duration) in ToInt64Nanoseconds()

12345678910>>...86