/libcore/jsr166-tests/src/test/java/jsr166/ |
D | TimeUnitTest.java | 17 import static java.util.concurrent.TimeUnit.SECONDS; 44 SECONDS.convert(t, DAYS)); in testConvert() 46 SECONDS.convert(t, HOURS)); in testConvert() 48 SECONDS.convert(t, MINUTES)); in testConvert() 50 SECONDS.convert(t, SECONDS)); in testConvert() 52 SECONDS.convert(1000L*t, MILLISECONDS)); in testConvert() 54 SECONDS.convert(1000000L*t, MICROSECONDS)); in testConvert() 56 SECONDS.convert(1000000000L*t, NANOSECONDS)); in testConvert() 65 MILLISECONDS.convert(t, SECONDS)); in testConvert() 80 MICROSECONDS.convert(t, SECONDS)); in testConvert() [all …]
|
D | ThreadPoolExecutorTest.java | 13 import static java.util.concurrent.TimeUnit.SECONDS; 232 assertEquals(1, p.getKeepAliveTime(SECONDS)); in testGetKeepAliveTime() 692 new ThreadPoolExecutor(-1, 1, 1L, SECONDS, in testConstructor1() 703 new ThreadPoolExecutor(1, -1, 1L, SECONDS, in testConstructor2() 714 new ThreadPoolExecutor(1, 0, 1L, SECONDS, in testConstructor3() 725 new ThreadPoolExecutor(1, 2, -1L, SECONDS, in testConstructor4() 736 new ThreadPoolExecutor(2, 1, 1L, SECONDS, in testConstructor5() 747 new ThreadPoolExecutor(1, 2, 1L, SECONDS, in testConstructorNullPointerException() 758 new ThreadPoolExecutor(-1, 1, 1L, SECONDS, in testConstructor6() 770 new ThreadPoolExecutor(1, -1, 1L, SECONDS, in testConstructor7() [all …]
|
D | ThreadPoolExecutorSubclassTest.java | 12 import static java.util.concurrent.TimeUnit.SECONDS; 379 assertEquals(1, p.getKeepAliveTime(SECONDS)); in testGetKeepAliveTime() 807 new CustomTPE(-1, 1, 1L, SECONDS, in testConstructor1() 818 new CustomTPE(1, -1, 1L, SECONDS, in testConstructor2() 829 new CustomTPE(1, 0, 1L, SECONDS, in testConstructor3() 840 new CustomTPE(1, 2, -1L, SECONDS, in testConstructor4() 851 new CustomTPE(2, 1, 1L, SECONDS, in testConstructor5() 862 new CustomTPE(1, 2, 1L, SECONDS, null); in testConstructorNullPointerException() 872 new CustomTPE(-1, 1, 1L, SECONDS, in testConstructor6() 884 new CustomTPE(1,-1, 1L, SECONDS, in testConstructor7() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/concurrent/ |
D | ForkJoinPoolTest.java | 93 /*unit*/ TimeUnit.SECONDS); in testConstructor_withKeepAliveTime() 108 /*unit*/ TimeUnit.SECONDS); in testConstructor_withKeepAliveTime() 123 /*unit*/ TimeUnit.SECONDS); in testConstructor_withKeepAliveTime() 138 /*unit*/ TimeUnit.SECONDS); in testConstructor_withKeepAliveTime() 153 /*unit*/ TimeUnit.SECONDS); in testConstructor_withKeepAliveTime() 167 /*unit*/ TimeUnit.SECONDS); in testConstructor_withKeepAliveTime()
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | TimeUnit8Test.java | 42 import static java.util.concurrent.TimeUnit.SECONDS; 70 assertSame(ChronoUnit.SECONDS, SECONDS.toChronoUnit()); in testToChronoUnit() 87 assertSame(SECONDS, TimeUnit.of(ChronoUnit.SECONDS)); in testTimeUnitOf() 118 assertEquals(n, SECONDS.convert(Duration.ofSeconds(n))); in testConvertDuration_roundtripDurationOf() 119 assertEquals(n, SECONDS.convert(Duration.of(n, ChronoUnit.SECONDS))); in testConvertDuration_roundtripDurationOf() 159 if (u.toNanos(1) > SECONDS.toNanos(1)) { in testConvertDuration_nearOverflow() 160 r = u.toNanos(1) / SECONDS.toNanos(1); in testConvertDuration_nearOverflow() 177 if (u != SECONDS) { in testConvertDuration_nearOverflow()
|
D | TimeUnitTest.java | 43 import static java.util.concurrent.TimeUnit.SECONDS; 68 SECONDS.convert(t, DAYS)); in testConvert() 70 SECONDS.convert(t, HOURS)); in testConvert() 72 SECONDS.convert(t, MINUTES)); in testConvert() 74 SECONDS.convert(t, SECONDS)); in testConvert() 76 SECONDS.convert(1000L*t, MILLISECONDS)); in testConvert() 78 SECONDS.convert(1000000L*t, MICROSECONDS)); in testConvert() 80 SECONDS.convert(1000000000L*t, NANOSECONDS)); in testConvert() 89 MILLISECONDS.convert(t, SECONDS)); in testConvert() 104 MICROSECONDS.convert(t, SECONDS)); in testConvert() [all …]
|
D | ThreadPoolExecutorTest.java | 39 import static java.util.concurrent.TimeUnit.SECONDS; 254 assertEquals(1, p.getKeepAliveTime(SECONDS)); in testGetKeepAliveTime() 714 new ThreadPoolExecutor(-1, 1, 1L, SECONDS, in testConstructor1() 725 new ThreadPoolExecutor(1, -1, 1L, SECONDS, in testConstructor2() 736 new ThreadPoolExecutor(1, 0, 1L, SECONDS, in testConstructor3() 747 new ThreadPoolExecutor(1, 2, -1L, SECONDS, in testConstructor4() 758 new ThreadPoolExecutor(2, 1, 1L, SECONDS, in testConstructor5() 769 new ThreadPoolExecutor(1, 2, 1L, SECONDS, in testConstructorNullPointerException() 780 new ThreadPoolExecutor(-1, 1, 1L, SECONDS, in testConstructor6() 792 new ThreadPoolExecutor(1, -1, 1L, SECONDS, in testConstructor7() [all …]
|
D | ThreadPoolExecutorSubclassTest.java | 38 import static java.util.concurrent.TimeUnit.SECONDS; 401 assertEquals(1, p.getKeepAliveTime(SECONDS)); in testGetKeepAliveTime() 829 new CustomTPE(-1, 1, 1L, SECONDS, in testConstructor1() 840 new CustomTPE(1, -1, 1L, SECONDS, in testConstructor2() 851 new CustomTPE(1, 0, 1L, SECONDS, in testConstructor3() 862 new CustomTPE(1, 2, -1L, SECONDS, in testConstructor4() 873 new CustomTPE(2, 1, 1L, SECONDS, in testConstructor5() 884 new CustomTPE(1, 2, 1L, SECONDS, null); in testConstructorNullPointerException() 894 new CustomTPE(-1, 1, 1L, SECONDS, in testConstructor6() 906 new CustomTPE(1,-1, 1L, SECONDS, in testConstructor7() [all …]
|
/libcore/ojluni/src/test/java/util/zip/ |
D | TestExtraTime.java | 84 test(FileTime.from(time, TimeUnit.SECONDS), in main() 85 FileTime.from(time, TimeUnit.SECONDS), in main() 86 FileTime.from(time, TimeUnit.SECONDS), in main() 91 test(FileTime.from(time, TimeUnit.SECONDS), in main() 92 FileTime.from(time + 30000, TimeUnit.SECONDS), in main() 93 FileTime.from(time + 30000, TimeUnit.SECONDS), in main() 200 mtime.to(TimeUnit.SECONDS) != in check() 201 ze.getLastModifiedTime().to(TimeUnit.SECONDS)) { in check() 205 atime.to(TimeUnit.SECONDS) != in check() 206 ze.getLastAccessTime().to(TimeUnit.SECONDS)) in check() [all …]
|
/libcore/ojluni/src/test/java/nio/file/attribute/ |
D | FileTimeTest.java | 86 cmp(Instant.MIN, Long.MIN_VALUE, SECONDS, 1); in main() 87 cmp(Instant.MIN, Instant.MIN.getEpochSecond() - 1, SECONDS, 1); in main() 88 cmp(Instant.MIN, Instant.MIN.getEpochSecond() - 100, SECONDS, 1); in main() 89 cmp(Instant.MIN, Instant.MIN.getEpochSecond(), SECONDS, 0); in main() 94 cmp(Instant.MAX, Long.MAX_VALUE, SECONDS, -1); in main() 95 cmp(Instant.MAX, Instant.MAX.getEpochSecond() + 1, SECONDS, -1); in main() 96 cmp(Instant.MAX, Instant.MAX.getEpochSecond() + 100, SECONDS, -1); in main() 97 cmp(Instant.MAX, Instant.MAX.getEpochSecond(), SECONDS, 0); in main() 138 if (unit.compareTo(TimeUnit.SECONDS) < 0) { in main() 146 if (unit.compareTo(TimeUnit.SECONDS) < 0) { in main() [all …]
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | ChronoField.java | 80 import static java.time.temporal.ChronoUnit.SECONDS; 133 NANO_OF_SECOND("NanoOfSecond", NANOS, SECONDS, ValueRange.of(0, 999_999_999)), 169 MICRO_OF_SECOND("MicroOfSecond", MICROS, SECONDS, ValueRange.of(0, 999_999)), 208 MILLI_OF_SECOND("MilliOfSecond", MILLIS, SECONDS, ValueRange.of(0, 999)), 237 SECOND_OF_MINUTE("SecondOfMinute", SECONDS, MINUTES, ValueRange.of(0, 59), "second"), 249 SECOND_OF_DAY("SecondOfDay", SECONDS, DAYS, ValueRange.of(0, 86400L - 1)), 599 …INSTANT_SECONDS("InstantSeconds", SECONDS, FOREVER, ValueRange.of(Long.MIN_VALUE, Long.MAX_VALUE)), 613 OFFSET_SECONDS("OffsetSeconds", SECONDS, FOREVER, ValueRange.of(-18 * 3600, 18 * 3600));
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | TimeUnit.java | 91 SECONDS(TimeUnit.SECOND_SCALE), enumConstant 190 case SECONDS: return sourceUnit.toSeconds(sourceDuration); in convert() 231 else if (this == SECONDS) in convert() 461 case SECONDS: return ChronoUnit.SECONDS; in toChronoUnit() 484 case SECONDS: return TimeUnit.SECONDS; in of()
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKInstant.java | 73 import static java.time.temporal.ChronoUnit.SECONDS; 634 …{Instant.ofEpochSecond(86400 + 3600 + 60 + 1, 123_456_789), SECONDS, Instant.ofEpochSecond(86400 +… 646 …{Instant.ofEpochSecond(86400 + 3600 + 60 + 1, 0), SECONDS, Instant.ofEpochSecond(86400 + 3600 + 60… 684 {SECONDS, MockSimplePeriod.of(5, SECONDS), 6, 0}, 689 {SECONDS, MockSimplePeriod.of(13, SECONDS), 14, 0}, 691 {SECONDS, Duration.ofSeconds(20, 40), 21, 40}, 942 …Instant i = Instant.ofEpochSecond(seconds, nanos).plus(otherSeconds, SECONDS).plus(otherNanos, NAN… 957 i.plus(-1, SECONDS); 1442 …Instant i = Instant.ofEpochSecond(seconds, nanos).minus(otherSeconds, SECONDS).minus(otherNanos, N… 1457 i.minus(-1, SECONDS); [all …]
|
D | MockSimplePeriod.java | 64 import static java.time.temporal.ChronoUnit.SECONDS; 86 public static final MockSimplePeriod ZERO_SECONDS = new MockSimplePeriod(0, SECONDS);
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | AsynchronousChannelGroupTest.java | 106 assertFalse(acg.awaitTermination(2, TimeUnit.SECONDS)); in test_shutdown() 150 assertTrue(acg.awaitTermination(TIMEOUT, TimeUnit.SECONDS)); in test_isTerminated() 163 assertFalse(acg.awaitTermination(TIMEOUT, TimeUnit.SECONDS)); in test_awaitTermination() 167 assertTrue(acg.awaitTermination(TIMEOUT, TimeUnit.SECONDS)); in test_awaitTermination()
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/ |
D | TCKChronoField.java | 95 import static java.time.temporal.ChronoUnit.SECONDS; 133 {SECOND_OF_DAY, SECONDS, DAYS}, in data_fieldUnit() 134 {SECOND_OF_MINUTE, SECONDS, MINUTES}, in data_fieldUnit() 136 {MILLI_OF_SECOND, MILLIS, SECONDS}, in data_fieldUnit() 137 {MICRO_OF_SECOND, MICROS, SECONDS}, in data_fieldUnit() 139 {NANO_OF_SECOND, NANOS, SECONDS}, in data_fieldUnit()
|
D | TCKChronoUnit.java | 72 import static java.time.temporal.ChronoUnit.SECONDS; 114 {SECONDS, false, true, false}, in data_chronoUnit() 145 {SECONDS, LocalTime.of(1, 2, 3, 400), true, 1, LocalTime.of(1, 2, 4, 400)}, in data_unitAndTemporal() 160 {SECONDS, LocalDate.of(2000, 2, 29), false, 1, null}, in data_unitAndTemporal()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | ThreadGroupTest.java | 54 assertTrue("Some thread was not interrupted", mLatch.await(5, TimeUnit.SECONDS)); in interrupt_shouldInterruptAllThreadsInAGroup() 70 assertTrue("Some thread was not interrupted", mLatch.await(5, TimeUnit.SECONDS)); in interrupt_shouldInterruptThreadsInSubgroups() 86 assertFalse("Both threads were interrupted", mLatch.await(5, TimeUnit.SECONDS)); in interrupt_shouldNotInterruptThreadsInParentGroup()
|
/libcore/luni/src/test/java/libcore/java/time/ |
D | OffsetDateTimeTest.java | 50 ODT.plus(60, ChronoUnit.SECONDS)); in test_plus() 66 ODT.minus(60, ChronoUnit.SECONDS)); in test_minus_utc_offset() 86 odt.minus(60, ChronoUnit.SECONDS)); in test_minus_non_utc_offset()
|
D | OffsetTimeTest.java | 52 NOON_UTC.plus(60, ChronoUnit.SECONDS)); in test_plus() 65 assertPlusIsNoop(24 * 60 * 60, ChronoUnit.SECONDS); in test_plus_noop()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | ServerSocketConcurrentCloseTest.java | 82 boolean completed = threadFinishedLatch.await(5, TimeUnit.SECONDS); in testImplAccept_detectsClosedState() 149 assertTrue("Slow server startup", serverRunnable.awaitStart(1, TimeUnit.SECONDS)); in checkConnectIterationAndCloseSocket() 150 assertTrue("Slow client startup", clientRunnable.awaitStart(1, TimeUnit.SECONDS)); in checkConnectIterationAndCloseSocket() 163 … boolean serverShutdownReached = serverRunnable.awaitShutdown(hardLimitSeconds, TimeUnit.SECONDS); in checkConnectIterationAndCloseSocket()
|
/libcore/ojluni/src/main/java/java/nio/file/attribute/ |
D | FileTime.java | 146 long secs = unit.convert(instant.getEpochSecond(), TimeUnit.SECONDS); in to() 247 case SECONDS: in toInstant() 312 return TimeUnit.SECONDS.toDays(toInstant().getEpochSecond()); in toDays() 320 return TimeUnit.SECONDS.toNanos(toInstant().getEpochSecond() in toExcessNanos() 415 if (instant == null && unit.compareTo(TimeUnit.SECONDS) >= 0) { in toString()
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/ |
D | TCKChronoUnitSerialization.java | 72 import static java.time.temporal.ChronoUnit.SECONDS; 109 {SECONDS}, in data_chronoUnit()
|
/libcore/ojluni/src/main/java/java/time/ |
D | Duration.java | 73 import static java.time.temporal.ChronoUnit.SECONDS; 472 long secs = startInclusive.until(endExclusive, SECONDS); in between() 529 if (unit == SECONDS) { in get() 562 Collections.unmodifiableList(Arrays.<TemporalUnit>asList(SECONDS, NANOS)); 708 case SECONDS: return plusSeconds(amountToAdd); in plus() 1085 temporal = temporal.plus(seconds, SECONDS); in addTo() 1120 temporal = temporal.minus(seconds, SECONDS); in subtractFrom() 1346 if (unit == ChronoUnit.SECONDS && (seconds >= 0 || nanos == 0)) { in truncatedTo()
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | MockSimplePeriod.java | 64 import static java.time.temporal.ChronoUnit.SECONDS; 86 public static final MockSimplePeriod ZERO_SECONDS = new MockSimplePeriod(0, SECONDS);
|