Home
last modified time | relevance | path

Searched refs:SECONDS (Results 1 – 25 of 100) sorted by relevance

1234

/libcore/jsr166-tests/src/test/java/jsr166/
DTimeUnitTest.java17 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 …]
DThreadPoolExecutorTest.java13 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 …]
DThreadPoolExecutorSubclassTest.java12 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/
DForkJoinPoolTest.java93 /*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/
DTimeUnit8Test.java42 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()
DTimeUnitTest.java43 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 …]
DThreadPoolExecutorTest.java39 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 …]
DThreadPoolExecutorSubclassTest.java38 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/
DTestExtraTime.java84 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/
DFileTimeTest.java86 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/
DChronoField.java80 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/
DTimeUnit.java91 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/
DTCKInstant.java73 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 …]
DMockSimplePeriod.java64 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/
DAsynchronousChannelGroupTest.java106 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/
DTCKChronoField.java95 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()
DTCKChronoUnit.java72 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/
DThreadGroupTest.java54 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/
DOffsetDateTimeTest.java50 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()
DOffsetTimeTest.java52 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/
DServerSocketConcurrentCloseTest.java82 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/
DFileTime.java146 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/
DTCKChronoUnitSerialization.java72 import static java.time.temporal.ChronoUnit.SECONDS;
109 {SECONDS}, in data_chronoUnit()
/libcore/ojluni/src/main/java/java/time/
DDuration.java73 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/
DMockSimplePeriod.java64 import static java.time.temporal.ChronoUnit.SECONDS;
86 public static final MockSimplePeriod ZERO_SECONDS = new MockSimplePeriod(0, SECONDS);

1234