Home
last modified time | relevance | path

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

12345678910>>...45

/external/protobuf/java/util/src/test/java/com/google/protobuf/util/
DTimeUtilTest.java245 Duration duration = TimeUtil.distance(start, end); in testDurationStringFormat() local
246 assertEquals("315537897599.999999999s", TimeUtil.toString(duration)); in testDurationStringFormat()
247 duration = TimeUtil.distance(end, start); in testDurationStringFormat()
248 assertEquals("-315537897599.999999999s", TimeUtil.toString(duration)); in testDurationStringFormat()
251 duration = Duration.newBuilder().setSeconds(1).build(); in testDurationStringFormat()
252 assertEquals("1s", TimeUtil.toString(duration)); in testDurationStringFormat()
253 duration = Duration.newBuilder().setNanos(10000000).build(); in testDurationStringFormat()
254 assertEquals("0.010s", TimeUtil.toString(duration)); in testDurationStringFormat()
255 duration = Duration.newBuilder().setNanos(10000).build(); in testDurationStringFormat()
256 assertEquals("0.000010s", TimeUtil.toString(duration)); in testDurationStringFormat()
[all …]
/external/libcxx/include/
Dchrono25 duration_cast(const duration<Rep, Period>& fd);
41 // duration
44 class duration
46 static_assert(!__is_duration<Rep>::value, "A duration representation can not be a duration");
47 …static_assert(__is_ratio<Period>::value, "Second template parameter of duration must be a std::rat…
48 static_assert(Period::num > 0, "duration period must be positive");
53 constexpr duration() = default;
55 constexpr explicit duration(const Rep2& r,
65 constexpr duration(const duration<Rep2, Period2>& d,
78 constexpr common_type<duration>::type operator+() const;
[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/lisa/tools/scripts/power/
Dgenerate_power_profile.py133 def _run_experiment(self, filename, duration, out_prefix, args=''): argument
136 duration, out_prefix, args))
147 duration = 120
150 'run_cpu_frequency.py'), duration, 'cpu_freq')
165 def _remove_cpu_power(self, power, duration, results_dir): argument
190 return power - energy / duration * 1000
192 def _remove_screen_full(self, power, duration, image): argument
196 self._run_experiment('run_display_image.py', duration, out_prefix,
201 duration, results_dir)
206 duration = 120
[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/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 public 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 public 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/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/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 …]
DStressEmitterTest.java44 float duration = (time2 - time1) / 1000000; in testPerformance() local
45 System.out.println("\nSingle dump was " + duration + " ms."); in testPerformance()
55 duration = ((time2 - time1) / 1000000) / (float) number; in testPerformance()
56 System.out.println("Duration for r=" + number + " was " + duration + " ms/dump."); in testPerformance()
58 if (duration > 3) { in testPerformance()
59 System.err.println("!!!!!! Too long. Expected <1 but was " + duration); in testPerformance()
71 duration = ((time2 - time1) / 1000000) / (float) number; in testPerformance()
72 System.out.println("Duration for r=" + number + " was " + duration + " ms/dump."); in testPerformance()
74 if (duration > 3) { in testPerformance()
75 System.err.println("!!!!!! Too long. Expected <1 but was " + duration); in testPerformance()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/duration/
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 …]
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 …]
/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/
DBasicPeriodBuilderFactory.java11 package android.icu.impl.duration;
15 import android.icu.impl.duration.impl.DataRecord;
16 import android.icu.impl.duration.impl.PeriodFormatterData;
17 import android.icu.impl.duration.impl.PeriodFormatterDataService;
162 Period createLimited(long duration, boolean inPast) { in createLimited() argument
165 if (duration * 1000 > maxLimit * maxUnitDuration) { in createLimited()
175 if (duration * 1000 < eml * emud) { in createLimited()
327 public Period create(long duration) { in create() argument
328 return createWithReferenceDate(duration, System.currentTimeMillis()); in create()
336 public Period createWithReferenceDate(long duration, long referenceDate) { in createWithReferenceDate() argument
[all …]
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/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/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/protobuf/java/util/src/main/java/com/google/protobuf/util/
DTimeUtil.java192 public static String toString(Duration duration) in toString() argument
194 if (duration.getSeconds() < DURATION_SECONDS_MIN in toString()
195 || duration.getSeconds() > DURATION_SECONDS_MAX) { in toString()
199 long seconds = duration.getSeconds(); in toString()
200 int nanos = duration.getNanos(); in toString()
292 public static long toMillis(Duration duration) { in toMillis() argument
293 return duration.getSeconds() * MILLIS_PER_SECOND + duration.getNanos() in toMillis()
330 public static long toMicros(Duration duration) { in toMicros() argument
331 return duration.getSeconds() * MICROS_PER_SECOND + duration.getNanos() in toMicros()
361 public static long toNanos(Duration duration) { in toNanos() argument
[all …]
/external/libcxx/test/std/utilities/time/time.duration/time.duration.comparisons/
Dop_equal.pass.cpp56 std::chrono::duration<int, std::ratio<2, 3> > s1(9); in main()
57 std::chrono::duration<int, std::ratio<3, 5> > s2(10); in main()
62 std::chrono::duration<int, std::ratio<2, 3> > s1(10); in main()
63 std::chrono::duration<int, std::ratio<3, 5> > s2(9); in main()
68 std::chrono::duration<int, std::ratio<2, 3> > s1(9); in main()
69 std::chrono::duration<double, std::ratio<3, 5> > s2(10); in main()
99 constexpr std::chrono::duration<int, std::ratio<2, 3> > s1(9); in main()
100 constexpr std::chrono::duration<int, std::ratio<3, 5> > s2(10); in main()
105 constexpr std::chrono::duration<int, std::ratio<2, 3> > s1(10); in main()
106 constexpr std::chrono::duration<int, std::ratio<3, 5> > s2(9); in main()
[all …]
/external/replicaisland/src/com/replica/replicaisland/
DLerp.java21 public static float lerp(float start, float target, float duration, float timeSinceStart) in lerp() argument
24 if (timeSinceStart > 0.0f && timeSinceStart < duration) in lerp()
27 final float percent = timeSinceStart / duration; in lerp()
30 else if (timeSinceStart >= duration) in lerp()
37 public static float ease(float start, float target, float duration, float timeSinceStart) in ease() argument
40 if (timeSinceStart > 0.0f && timeSinceStart < duration) in ease()
43 final float percent = timeSinceStart / (duration / 2.0f); in ease()
55 else if (timeSinceStart >= duration) in ease()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/util/
DTimer.java22 private long duration; field in Timer
33 duration = Long.MIN_VALUE; in start()
39 duration = System.nanoTime() - startTime; in getDuration()
42 return duration; in getDuration()
115 if (duration >= timingPeriod) { in timeIterations()
116 duration /= iterations; in timeIterations()
117 return Math.min(duration, shortest); in timeIterations()
118 } else if (duration >= timingPeriod / 4) { in timeIterations()
119 duration /= iterations; in timeIterations()
120 shortest = Math.min(duration, shortest); in timeIterations()

12345678910>>...45