/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 …]
|
D | RecursiveTaskTest.java | 9 import static java.util.concurrent.TimeUnit.SECONDS; 77 a.get(5L, SECONDS); in checkNotDone() 84 a.get(0L, SECONDS); in checkNotDone() 104 assertSame(expected, a.get(5L, SECONDS)); in checkCompletedNormally() 149 a.get(5L, SECONDS); in checkCancelled() 180 a.get(5L, SECONDS); in checkCompletedAbnormally() 301 Integer r = f.get(5L, SECONDS); in testForkTimedGet() 427 Integer r = f.get(5L, SECONDS); in testAbnormalForkTimedGet() 524 Integer r = f.get(5L, SECONDS); in testCancelledForkTimedGet()
|
D | RecursiveActionTest.java | 9 import static java.util.concurrent.TimeUnit.SECONDS; 80 a.get(5L, SECONDS); in checkNotDone() 87 a.get(0L, SECONDS); in checkNotDone() 107 assertNull(a.get(5L, SECONDS)); in checkCompletedNormally() 132 a.get(5L, SECONDS); in checkCancelled() 163 a.get(5L, SECONDS); in checkCompletedAbnormally() 461 assertNull(f.get(5L, SECONDS)); in testForkTimedGet() 596 f.get(5L, SECONDS); in testAbnormalForkTimedGet() 688 f.get(5L, SECONDS); in testCancelledForkTimedGet()
|
/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 …]
|
D | BasicFileAttributeViewTest.java | 61 check(f.lastModified()/1000 == attrs.lastModifiedTime().to(TimeUnit.SECONDS), in checkAttributesOfDirectory() 77 check(f.lastModified()/1000 == attrs.lastModifiedTime().to(TimeUnit.SECONDS), in checkAttributesOfFile()
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | ChronoField.java | 80 import static java.time.temporal.ChronoUnit.SECONDS; 122 NANO_OF_SECOND("NanoOfSecond", NANOS, SECONDS, ValueRange.of(0, 999_999_999)), 158 MICRO_OF_SECOND("MicroOfSecond", MICROS, SECONDS, ValueRange.of(0, 999_999)), 197 MILLI_OF_SECOND("MilliOfSecond", MILLIS, SECONDS, ValueRange.of(0, 999)), 226 SECOND_OF_MINUTE("SecondOfMinute", SECONDS, MINUTES, ValueRange.of(0, 59), "second"), 238 SECOND_OF_DAY("SecondOfDay", SECONDS, DAYS, ValueRange.of(0, 86400L - 1)), 576 …INSTANT_SECONDS("InstantSeconds", SECONDS, FOREVER, ValueRange.of(Long.MIN_VALUE, Long.MAX_VALUE)), 590 OFFSET_SECONDS("OffsetSeconds", SECONDS, FOREVER, ValueRange.of(-18 * 3600, 18 * 3600));
|
/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 +… 678 {SECONDS, MockSimplePeriod.of(5, SECONDS), 6, 0}, 683 {SECONDS, MockSimplePeriod.of(13, SECONDS), 14, 0}, 685 {SECONDS, Duration.ofSeconds(20, 40), 21, 40}, 936 …Instant i = Instant.ofEpochSecond(seconds, nanos).plus(otherSeconds, SECONDS).plus(otherNanos, NAN… 951 i.plus(-1, SECONDS); 1436 …Instant i = Instant.ofEpochSecond(seconds, nanos).minus(otherSeconds, SECONDS).minus(otherNanos, N… 1451 i.minus(-1, SECONDS); 1720 {5, 650, -1, 650, SECONDS, -6}, [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/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/util/zip/ |
D | ZipUtils.java | 56 return FileTime.from(utime, TimeUnit.SECONDS); in unixTimeToFileTime() 63 return ftime.to(TimeUnit.SECONDS); in fileTimeToUnixTime()
|
/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);
|
/libcore/luni/src/test/java/libcore/java/time/ |
D | OffsetTimeTest.java | 52 NOON_UTC.plus(60, ChronoUnit.SECONDS)); in test_plus() 65 assertPlusIsNoop(24 * 60 * 60, ChronoUnit.SECONDS); in test_plus_noop()
|
D | OffsetDateTimeTest.java | 50 ODT.plus(60, ChronoUnit.SECONDS)); in test_plus()
|
/libcore/ojluni/src/main/java/java/time/ |
D | Duration.java | 71 import static java.time.temporal.ChronoUnit.SECONDS; 469 long secs = startInclusive.until(endExclusive, SECONDS); in between() 526 if (unit == SECONDS) { in get() 559 Collections.unmodifiableList(Arrays.<TemporalUnit>asList(SECONDS, NANOS)); 705 case SECONDS: return plusSeconds(amountToAdd); in plus() 1064 temporal = temporal.plus(seconds, SECONDS); in addTo() 1099 temporal = temporal.minus(seconds, SECONDS); in subtractFrom()
|
/libcore/support/src/test/java/tests/support/ |
D | Support_Exec.java | 95 out = outFuture.get(30, TimeUnit.SECONDS); in execAndGetOutput() 96 String err = errFuture.get(30, TimeUnit.SECONDS); in execAndGetOutput()
|
/libcore/support/src/test/java/libcore/javax/net/ssl/ |
D | TestSSLSocketPair.java | 103 s.get(30, TimeUnit.SECONDS); in connect() 111 c.get(30, TimeUnit.SECONDS); in connect()
|
/libcore/luni/src/main/java/javax/xml/datatype/ |
D | Duration.java | 163 boolean secondSet = isSet(DatatypeConstants.SECONDS); in getXMLSchemaType() 299 return getFieldValueAsInt(DatatypeConstants.SECONDS); in getSeconds() 909 BigDecimal seconds = (BigDecimal) getField(DatatypeConstants.SECONDS); in toString()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/apache/harmony/kernel/dalvik/ |
D | ThreadsTest.java | 192 barrier.await(60, TimeUnit.SECONDS); in run() 293 barrier.await(60, TimeUnit.SECONDS); in run()
|