/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/ |
D | TimeUnit.java | 18 public final class TimeUnit { class 26 private TimeUnit(String name, int ordinal) { in TimeUnit() method in TimeUnit 37 public static final TimeUnit YEAR = new TimeUnit("year", 0); 40 public static final TimeUnit MONTH = new TimeUnit("month", 1); 43 public static final TimeUnit WEEK = new TimeUnit("week", 2); 46 public static final TimeUnit DAY = new TimeUnit("day", 3); 49 public static final TimeUnit HOUR = new TimeUnit("hour", 4); 52 public static final TimeUnit MINUTE = new TimeUnit("minute", 5); 55 public static final TimeUnit SECOND = new TimeUnit("second", 6); 58 public static final TimeUnit MILLISECOND = new TimeUnit("millisecond", 7); [all …]
|
D | TimeUnitConstants.java | 19 public static final TimeUnit YEAR = TimeUnit.YEAR; 22 public static final TimeUnit MONTH = TimeUnit.MONTH; 25 public static final TimeUnit WEEK = TimeUnit.WEEK; 28 public static final TimeUnit DAY = TimeUnit.DAY; 31 public static final TimeUnit HOUR = TimeUnit.HOUR; 34 public static final TimeUnit MINUTE = TimeUnit.MINUTE; 37 public static final TimeUnit SECOND = TimeUnit.SECOND; 40 public static final TimeUnit MILLISECOND = TimeUnit.MILLISECOND;
|
D | BasicPeriodBuilderFactory.java | 34 static long approximateDurationOf(TimeUnit unit) { in approximateDurationOf() 35 return TimeUnit.approxDurations[unit.ordinal]; in approximateDurationOf() 41 TimeUnit maxUnit = TimeUnit.YEAR; 42 TimeUnit minUnit = TimeUnit.MILLISECOND; 59 result.maxUnit = TimeUnit.YEAR; in setUnits() 60 result.minUnit = TimeUnit.MILLISECOND; in setUnits() 63 for (int i = 0; i < TimeUnit.units.length; ++i) { in setUnits() 66 result.maxUnit = TimeUnit.units[i]; in setUnits() 75 result.minUnit = TimeUnit.units[lastUnit]; in setUnits() 86 return (short)(uset & ~(1 << TimeUnit.MILLISECOND.ordinal)); in effectiveSet() [all …]
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/duration/ |
D | TimeUnit.java | 16 public final class TimeUnit { class 24 private TimeUnit(String name, int ordinal) { in TimeUnit() method in TimeUnit 35 public static final TimeUnit YEAR = new TimeUnit("year", 0); 38 public static final TimeUnit MONTH = new TimeUnit("month", 1); 41 public static final TimeUnit WEEK = new TimeUnit("week", 2); 44 public static final TimeUnit DAY = new TimeUnit("day", 3); 47 public static final TimeUnit HOUR = new TimeUnit("hour", 4); 50 public static final TimeUnit MINUTE = new TimeUnit("minute", 5); 53 public static final TimeUnit SECOND = new TimeUnit("second", 6); 56 public static final TimeUnit MILLISECOND = new TimeUnit("millisecond", 7); [all …]
|
D | TimeUnitConstants.java | 17 public static final TimeUnit YEAR = TimeUnit.YEAR; 20 public static final TimeUnit MONTH = TimeUnit.MONTH; 23 public static final TimeUnit WEEK = TimeUnit.WEEK; 26 public static final TimeUnit DAY = TimeUnit.DAY; 29 public static final TimeUnit HOUR = TimeUnit.HOUR; 32 public static final TimeUnit MINUTE = TimeUnit.MINUTE; 35 public static final TimeUnit SECOND = TimeUnit.SECOND; 38 public static final TimeUnit MILLISECOND = TimeUnit.MILLISECOND;
|
D | BasicPeriodBuilderFactory.java | 33 static long approximateDurationOf(TimeUnit unit) { in approximateDurationOf() 34 return TimeUnit.approxDurations[unit.ordinal]; in approximateDurationOf() 40 TimeUnit maxUnit = TimeUnit.YEAR; 41 TimeUnit minUnit = TimeUnit.MILLISECOND; 58 result.maxUnit = TimeUnit.YEAR; in setUnits() 59 result.minUnit = TimeUnit.MILLISECOND; in setUnits() 62 for (int i = 0; i < TimeUnit.units.length; ++i) { in setUnits() 65 result.maxUnit = TimeUnit.units[i]; in setUnits() 74 result.minUnit = TimeUnit.units[lastUnit]; in setUnits() 85 return (short)(uset & ~(1 << TimeUnit.MILLISECOND.ordinal)); in effectiveSet() [all …]
|
/external/icu/icu4c/source/i18n/ |
D | tmunit.cpp | 17 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TimeUnit) in UOBJECT_DEFINE_RTTI_IMPLEMENTATION() argument 58 TimeUnit* U_EXPORT2 in UOBJECT_DEFINE_RTTI_IMPLEMENTATION() 59 TimeUnit::createInstance(TimeUnit::UTimeUnitFields timeUnitField, in UOBJECT_DEFINE_RTTI_IMPLEMENTATION() 68 return new TimeUnit(timeUnitField); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION() 72 TimeUnit::TimeUnit(TimeUnit::UTimeUnitFields timeUnitField) { in TimeUnit() function in TimeUnit 102 TimeUnit::TimeUnit(const TimeUnit& other) in TimeUnit() function in TimeUnit 107 TimeUnit::clone() const { in clone() 108 return new TimeUnit(*this); in clone() 111 TimeUnit& 112 TimeUnit::operator=(const TimeUnit& other) { in operator =() [all …]
|
D | tmutfmt.cpp | 114 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in TimeUnitFormat() 115 i < TimeUnit::UTIMEUNIT_FIELD_COUNT; in TimeUnitFormat() 116 i = (TimeUnit::UTimeUnitFields)(i+1)) { in TimeUnitFormat() 130 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in ~TimeUnitFormat() 131 i < TimeUnit::UTIMEUNIT_FIELD_COUNT; in ~TimeUnitFormat() 132 i = (TimeUnit::UTimeUnitFields)(i+1)) { in ~TimeUnitFormat() 151 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in operator =() 152 i < TimeUnit::UTIMEUNIT_FIELD_COUNT; in operator =() 153 i = (TimeUnit::UTimeUnitFields)(i+1)) { in operator =() 157 for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; in operator =() [all …]
|
/external/caliper/caliper/src/main/java/com/google/caliper/util/ |
D | ShortDuration.java | 33 import java.util.concurrent.TimeUnit; 47 public static ShortDuration of(long duration, TimeUnit unit) { in of() 54 long nanos = TimeUnit.NANOSECONDS.convert(duration, unit); in of() 58 public static ShortDuration of(BigDecimal duration, TimeUnit unit) { in of() 73 TimeUnit unit = ABBREV_TO_UNIT.get(abbrev); in valueOf() 106 public long to(TimeUnit unit) { in to() 110 public abstract long to(TimeUnit unit, RoundingMode roundingMode); in to() 165 @Override public long to(TimeUnit unit, RoundingMode roundingMode) { 214 @Override public long to(TimeUnit unit, RoundingMode roundingMode) { in to() 268 TimeUnit bestUnit = TimeUnit.NANOSECONDS; in toString() [all …]
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/duration/ |
D | PeriodTest.java | 20 import com.ibm.icu.impl.duration.TimeUnit; 26 Period p = Period.at(0, TimeUnit.YEAR); in testIsSet() 28 assertTrue(null, p.isSet(TimeUnit.YEAR)); in testIsSet() 29 assertFalse(null, p.isSet(TimeUnit.MONTH)); in testIsSet() 30 assertEquals(null, 0f, p.getCount(TimeUnit.YEAR), .1f); in testIsSet() 31 p = p.omit(TimeUnit.YEAR); in testIsSet() 32 assertFalse(null, p.isSet(TimeUnit.YEAR)); in testIsSet() 37 Period p = Period.moreThan(1, TimeUnit.YEAR); in testMoreLessThan() 50 p = Period.lessThan(1, TimeUnit.YEAR); in testMoreLessThan() 54 p = Period.at(1, TimeUnit.YEAR); in testMoreLessThan() [all …]
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/duration/ |
D | PeriodTest.java | 21 import android.icu.impl.duration.TimeUnit; 29 Period p = Period.at(0, TimeUnit.YEAR); in testIsSet() 31 assertTrue(null, p.isSet(TimeUnit.YEAR)); in testIsSet() 32 assertFalse(null, p.isSet(TimeUnit.MONTH)); in testIsSet() 33 assertEquals(null, 0f, p.getCount(TimeUnit.YEAR), .1f); in testIsSet() 34 p = p.omit(TimeUnit.YEAR); in testIsSet() 35 assertFalse(null, p.isSet(TimeUnit.YEAR)); in testIsSet() 40 Period p = Period.moreThan(1, TimeUnit.YEAR); in testMoreLessThan() 53 p = Period.lessThan(1, TimeUnit.YEAR); in testMoreLessThan() 57 p = Period.at(1, TimeUnit.YEAR); in testMoreLessThan() [all …]
|
/external/icu/icu4c/source/test/intltest/ |
D | tufmtts.cpp | 121 for (TimeUnit::UTimeUnitFields j = TimeUnit::UTIMEUNIT_YEAR; in testBasic() 122 j < TimeUnit::UTIMEUNIT_FIELD_COUNT; in testBasic() 123 j = (TimeUnit::UTimeUnitFields)(j+1)) { in testBasic() 171 TimeUnit* tmunit = TimeUnit::createInstance(TimeUnit::UTIMEUNIT_YEAR, status); in testAPI() 174 TimeUnit* another = (TimeUnit*)tmunit->clone(); in testAPI() 175 TimeUnit third(*tmunit); in testAPI() 176 TimeUnit fourth = third; in testAPI() 181 TimeUnit* tmunit_m = TimeUnit::createInstance(TimeUnit::UTIMEUNIT_MONTH, status); in testAPI() 184 TimeUnit::UTimeUnitFields field = tmunit_m->getTimeUnitField(); in testAPI() 185 assertTrue("field of month time unit is month", (field == TimeUnit::UTIMEUNIT_MONTH)); in testAPI() [all …]
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
D | WrappingScheduledExecutorServiceTest.java | 29 import java.util.concurrent.TimeUnit; 48 testExecutor.schedule(DO_NOTHING, 10, TimeUnit.MINUTES); in testSchedule() 49 mock.assertLastMethodCalled("scheduleRunnable", 10, TimeUnit.MINUTES); in testSchedule() 51 testExecutor.schedule(Executors.callable(DO_NOTHING), 5, TimeUnit.SECONDS); in testSchedule() 52 mock.assertLastMethodCalled("scheduleCallable", 5, TimeUnit.SECONDS); in testSchedule() 58 testExecutor.scheduleWithFixedDelay(DO_NOTHING, 100, 10, TimeUnit.MINUTES); in testSchedule_repeating() 59 mock.assertLastMethodCalled("scheduleWithFixedDelay", 100, 10, TimeUnit.MINUTES); in testSchedule_repeating() 61 testExecutor.scheduleAtFixedRate(DO_NOTHING, 3, 7, TimeUnit.SECONDS); in testSchedule_repeating() 62 mock.assertLastMethodCalled("scheduleAtFixedRate", 3, 7, TimeUnit.SECONDS); in testSchedule_repeating() 110 TimeUnit lastUnit; [all …]
|
D | SimpleTimeLimiterTest.java | 24 import java.util.concurrent.TimeUnit; 43 TimeUnit.MILLISECONDS.sleep(DELAY_MS); in someGoodStaticMethod() 49 TimeUnit.MILLISECONDS.sleep(DELAY_MS); in someBadStaticMethod() 66 }, ENOUGH_MS, TimeUnit.MILLISECONDS, true); in testGoodCallableWithEnoughTime() 80 }, NOT_ENOUGH_MS, TimeUnit.MILLISECONDS, true); in testGoodCallableWithNotEnoughTime() 96 }, ENOUGH_MS, TimeUnit.MILLISECONDS, true); in testBadCallableWithEnoughTime() 112 }, NOT_ENOUGH_MS, TimeUnit.MILLISECONDS, true); in testBadCallableWithNotEnoughTime() 122 target, Sample.class, ENOUGH_MS, TimeUnit.MILLISECONDS); in testGoodMethodWithEnoughTime() 132 target, Sample.class, NOT_ENOUGH_MS, TimeUnit.MILLISECONDS); in testGoodMethodWithNotEnoughTime() 143 TimeUnit.MILLISECONDS.sleep(ENOUGH_MS); in testGoodMethodWithNotEnoughTime() [all …]
|
/external/junit/src/main/java/org/junit/rules/ |
D | Timeout.java | 7 import java.util.concurrent.TimeUnit; 42 private final TimeUnit timeUnit; 67 this(millis, TimeUnit.MILLISECONDS); in Timeout() 79 public Timeout(long timeout, TimeUnit timeUnit) { in Timeout() 102 return new Timeout(millis, TimeUnit.MILLISECONDS); in millis() 112 return new Timeout(seconds, TimeUnit.SECONDS); in seconds() 120 protected final long getTimeout(TimeUnit unit) { in getTimeout() 159 private TimeUnit timeUnit = TimeUnit.SECONDS; 179 public Builder withTimeout(long timeout, TimeUnit unit) { in withTimeout() 189 protected TimeUnit getTimeUnit() { in getTimeUnit()
|
/external/guava/guava-tests/test/com/google/common/cache/ |
D | CacheBuilderGwtTest.java | 35 import java.util.concurrent.TimeUnit; 138 .expireAfterAccess(1000, TimeUnit.MILLISECONDS) in testExpireAfterAccess() 145 fakeTicker.advance(999, TimeUnit.MILLISECONDS); in testExpireAfterAccess() 147 fakeTicker.advance(1, TimeUnit.MILLISECONDS); in testExpireAfterAccess() 149 fakeTicker.advance(1000, TimeUnit.MILLISECONDS); in testExpireAfterAccess() 155 .expireAfterWrite(1000, TimeUnit.MILLISECONDS) in testExpireAfterWrite() 163 fakeTicker.advance(999, TimeUnit.MILLISECONDS); in testExpireAfterWrite() 168 fakeTicker.advance(2, TimeUnit.MILLISECONDS); in testExpireAfterWrite() 176 fakeTicker.advance(1000, TimeUnit.MILLISECONDS); in testExpireAfterWrite() 182 .expireAfterWrite(1000, TimeUnit.MILLISECONDS) in testExpireAfterWriteAndAccess() [all …]
|
/external/guava/guava/src/com/google/common/base/ |
D | Stopwatch.java | 21 import static java.util.concurrent.TimeUnit.DAYS; 22 import static java.util.concurrent.TimeUnit.HOURS; 23 import static java.util.concurrent.TimeUnit.MICROSECONDS; 24 import static java.util.concurrent.TimeUnit.MILLISECONDS; 25 import static java.util.concurrent.TimeUnit.MINUTES; 26 import static java.util.concurrent.TimeUnit.NANOSECONDS; 27 import static java.util.concurrent.TimeUnit.SECONDS; 33 import java.util.concurrent.TimeUnit; 207 public long elapsed(TimeUnit desiredUnit) { in elapsed() 218 TimeUnit unit = chooseUnit(nanos); in toString() [all …]
|
/external/okhttp/okhttp-android-support/src/test/java/com/squareup/okhttp/internal/huc/ |
D | ResponseCacheTest.java | 63 import java.util.concurrent.TimeUnit; 185 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in assertCached() 186 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in assertCached() 232 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in testResponseCaching() 233 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in testResponseCaching() 261 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in secureResponseCaching() 262 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in secureResponseCaching() 291 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in responseCachingAndRedirects() 292 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in responseCachingAndRedirects() 296 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in responseCachingAndRedirects() [all …]
|
/external/guava/guava-gwt/test-super/com/google/common/testing/super/com/google/common/testing/ |
D | FakeTickerTest.java | 24 import java.util.concurrent.TimeUnit; 39 ticker.advance(1, TimeUnit.MILLISECONDS); in testAdvance() 45 assertSame(ticker, ticker.setAutoIncrementStep(10, TimeUnit.NANOSECONDS)); in testAutoIncrementStep_returnsSameInstance() 49 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, TimeUnit.NANOSECONDS); in testAutoIncrementStep_nanos() 56 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(1, TimeUnit.MILLISECONDS); in testAutoIncrementStep_millis() 63 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(3, TimeUnit.SECONDS); in testAutoIncrementStep_seconds() 70 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, TimeUnit.NANOSECONDS); in testAutoIncrementStep_resetToZero() 75 for (TimeUnit timeUnit : EnumSet.allOf(TimeUnit.class)) { in testAutoIncrementStep_resetToZero() 86 ticker.setAutoIncrementStep(-1, TimeUnit.NANOSECONDS); in testAutoIncrement_negative()
|
/external/icu/icu4c/source/i18n/unicode/ |
D | tmunit.h | 32 class U_I18N_API TimeUnit: public MeasureUnit { 65 static TimeUnit* U_EXPORT2 createInstance(UTimeUnitFields timeUnitField, 79 TimeUnit(const TimeUnit& other); 85 TimeUnit& operator=(const TimeUnit& other); 117 virtual ~TimeUnit(); 126 TimeUnit(UTimeUnitFields timeUnitField);
|
/external/guava/guava-gwt/src-super/com/google/common/base/super/com/google/common/base/ |
D | Stopwatch.java | 21 import static java.util.concurrent.TimeUnit.DAYS; 22 import static java.util.concurrent.TimeUnit.HOURS; 23 import static java.util.concurrent.TimeUnit.MICROSECONDS; 24 import static java.util.concurrent.TimeUnit.MILLISECONDS; 25 import static java.util.concurrent.TimeUnit.MINUTES; 26 import static java.util.concurrent.TimeUnit.NANOSECONDS; 27 import static java.util.concurrent.TimeUnit.SECONDS; 32 import java.util.concurrent.TimeUnit; 206 public long elapsed(TimeUnit desiredUnit) { in elapsed() 210 private static TimeUnit chooseUnit(long nanos) { in chooseUnit() [all …]
|
/external/okhttp/okhttp-urlconnection/src/test/java/com/squareup/okhttp/ |
D | UrlConnectionCacheTest.java | 50 import java.util.concurrent.TimeUnit; 168 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in assertCached() 169 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in assertCached() 216 new MockResponse().addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in testResponseCaching() 217 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in testResponseCaching() 250 server.enqueue(new MockResponse().addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in secureResponseCaching() 251 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in secureResponseCaching() 283 server.enqueue(new MockResponse().addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in responseCachingAndRedirects() 284 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in responseCachingAndRedirects() 287 server.enqueue(new MockResponse().addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in responseCachingAndRedirects() [all …]
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/ |
D | TimeUnitFormat.java | 27 import com.ibm.icu.util.TimeUnit; 101 private transient Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns; 265 TimeUnit resultTimeUnit = null; in parseObject() 273 for (TimeUnit timeUnit : timeUnitToCountToPatterns.keySet()) { in parseObject() 360 timeUnitToCountToPatterns = new HashMap<TimeUnit, Map<String, Object[]>>(); in setup() 368 Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns; 374 TimeUnitFormatSetupSink(Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns, in TimeUnitFormatSetupSink() argument 395 TimeUnit timeUnit = null; in put() 398 timeUnit = TimeUnit.YEAR; in put() 400 timeUnit = TimeUnit.MONTH; in put() [all …]
|
/external/icu/android_icu4j/src/main/java/android/icu/text/ |
D | TimeUnitFormat.java | 28 import android.icu.util.TimeUnit; 103 private transient Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns; 267 TimeUnit resultTimeUnit = null; in parseObject() 275 for (TimeUnit timeUnit : timeUnitToCountToPatterns.keySet()) { in parseObject() 362 timeUnitToCountToPatterns = new HashMap<TimeUnit, Map<String, Object[]>>(); in setup() 370 Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns; 376 TimeUnitFormatSetupSink(Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns, in TimeUnitFormatSetupSink() argument 397 TimeUnit timeUnit = null; in put() 400 timeUnit = TimeUnit.YEAR; in put() 402 timeUnit = TimeUnit.MONTH; in put() [all …]
|
/external/guava/guava-tests/test/com/google/common/collect/ |
D | QueuesTest.java | 33 import java.util.concurrent.TimeUnit; 68 threadPool.awaitTermination(1, TimeUnit.SECONDS)); in tearDown() 72 long timeout, TimeUnit unit, boolean interruptibly) throws InterruptedException { in drain() 94 int elements = drain(q, buf, 100, Long.MAX_VALUE, TimeUnit.NANOSECONDS, interruptibly); in testMultipleProducers() 109 assertEquals(0, Queues.drain(q, ImmutableList.of(), 1, 10, TimeUnit.MILLISECONDS)); in testDrainTimesOut() 117 int drained = drain(q, Lists.newArrayList(), 2, 10, TimeUnit.MILLISECONDS, interruptibly); in testDrainTimesOut() 120 assertTrue((System.nanoTime() - startTime) >= TimeUnit.MILLISECONDS.toNanos(10)); in testDrainTimesOut() 139 assertEquals(0, drain(q, ImmutableList.of(), 0, 10, TimeUnit.MILLISECONDS, interruptibly)); in testZeroElements() 163 int elements = Queues.drain(q, buf, -1, Long.MAX_VALUE, TimeUnit.NANOSECONDS); in testNegativeMaxElements() 169 Queues.drain(q, buf, 1, Long.MAX_VALUE, TimeUnit.NANOSECONDS); in testNegativeMaxElements() [all …]
|