/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKDuration.java | 124 Duration t = Duration.ofSeconds(i); in factory_seconds_long() 137 Duration t = Duration.ofSeconds(i, j); in factory_seconds_long_long() 142 Duration t = Duration.ofSeconds(i, j); in factory_seconds_long_long() 147 Duration t = Duration.ofSeconds(i, j); in factory_seconds_long_long() 156 Duration test = Duration.ofSeconds(2L, -1); in factory_seconds_long_long_nanosNegativeAdjusted() 163 Duration.ofSeconds(Long.MAX_VALUE, 1000000000); in factory_seconds_long_long_tooBig() 678 assertEquals(test, Duration.ofSeconds(expectedSeconds, expectedNanoOfSecond).negated()); in factory_parse_minus() 878 assertEquals(Duration.between(start, end), Duration.ofSeconds(3)); in factory_between_TemporalTemporal_mixedTypes() 906 assertEquals(Duration.ofSeconds(0).isZero(), true); in test_isZero() 908 assertEquals(Duration.ofSeconds(1).isZero(), false); in test_isZero() [all …]
|
D | TCKClock_Tick.java | 124 Clock.tick(Clock.systemUTC(), Duration.ofSeconds(Long.MAX_VALUE)); in test_tick_ClockDuration_maxDuration() 129 Clock.tick(Clock.systemUTC(), Duration.ofSeconds(0, 123)); in test_tick_ClockDuration_subMilliNotDivisible_123ns() 134 Clock.tick(Clock.systemUTC(), Duration.ofSeconds(0, 999)); in test_tick_ClockDuration_subMilliNotDivisible_999ns() 139 Clock.tick(Clock.systemUTC(), Duration.ofSeconds(0, 999_999_999)); in test_tick_ClockDuration_subMilliNotDivisible_999_999_999ns() 144 Clock.tick(Clock.systemUTC(), Duration.ofSeconds(0, -1)); in test_tick_ClockDuration_negative1ns() 149 Clock.tick(Clock.systemUTC(), Duration.ofSeconds(-1)); in test_tick_ClockDuration_negative1s()
|
D | TCKClock_Offset.java | 83 private static final Duration OFFSET = Duration.ofSeconds(2);
|
D | TCKInstant.java | 691 {SECONDS, Duration.ofSeconds(20, 40), 21, 40}, 692 {NANOS, Duration.ofSeconds(30, 300), 31, 300}, 922 …Instant i = Instant.ofEpochSecond(seconds, nanos).plus(Duration.ofSeconds(otherSeconds, otherNanos… 930 i.plus(Duration.ofSeconds(0, 1)); 936 i.plus(Duration.ofSeconds(-1, 999999999)); 1422 …Instant i = Instant.ofEpochSecond(seconds, nanos).minus(Duration.ofSeconds(otherSeconds, otherNano… 1430 i.minus(Duration.ofSeconds(0, 1)); 1436 i.minus(Duration.ofSeconds(-1, 999999999));
|
D | TCKYear.java | 533 {Duration.ofSeconds(1)}, in data_plusInvalidUnit() 665 {Duration.ofSeconds(1)}, in data_minusInvalidUnit()
|
D | TCKYearMonth.java | 821 {YearMonth.of(1, 1), Duration.ofSeconds(365*24*3600), null, DateTimeException.class}, in data_plus_TemporalAmount() 1036 {YearMonth.of(1, 1), Duration.ofSeconds(365*24*3600), null, DateTimeException.class}, in data_minus_TemporalAmount()
|
D | TCKOffsetDateTime.java | 921 Duration dur = Duration.ofSeconds(62, 3); 1032 Duration dur = Duration.ofSeconds(62, 3);
|
D | TCKZonedDateTime.java | 1644 Duration duration = Duration.ofSeconds(4L * 60 * 60 + 5L * 60 + 6L); 1849 Duration duration = Duration.ofSeconds(4L * 60 * 60 + 5L * 60 + 6L);
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | ChronoUnit.java | 99 SECONDS("Seconds", Duration.ofSeconds(1)), 104 MINUTES("Minutes", Duration.ofSeconds(60)), 109 HOURS("Hours", Duration.ofSeconds(3600)), 114 HALF_DAYS("HalfDays", Duration.ofSeconds(43200)), 125 DAYS("Days", Duration.ofSeconds(86400)), 132 WEEKS("Weeks", Duration.ofSeconds(7 * 86400L)), 140 MONTHS("Months", Duration.ofSeconds(31556952L / 12)), 149 YEARS("Years", Duration.ofSeconds(31556952L)), 157 DECADES("Decades", Duration.ofSeconds(31556952L * 10L)), 165 CENTURIES("Centuries", Duration.ofSeconds(31556952L * 100L)), [all …]
|
D | IsoFields.java | 674 WEEK_BASED_YEARS("WeekBasedYears", Duration.ofSeconds(31556952L)), 678 QUARTER_YEARS("QuarterYears", Duration.ofSeconds(31556952L / 4));
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestDuration.java | 84 Duration t = Duration.ofSeconds(-1); in plus_zeroReturnsThis() 90 Duration t = Duration.ofSeconds(-1); in plus_zeroSingleton() 91 assertSame(t.plus(Duration.ofSeconds(1)), Duration.ZERO); in plus_zeroSingleton() 96 Duration t = Duration.ofSeconds(-1); in plusSeconds_zeroReturnsThis() 102 Duration t = Duration.ofSeconds(-1); in plusSeconds_zeroSingleton() 108 Duration t = Duration.ofSeconds(-1, 2000000); in plusMillis_zeroReturnsThis() 114 Duration t = Duration.ofSeconds(-1, 2000000); in plusMillis_zeroSingleton() 120 Duration t = Duration.ofSeconds(-1, 2000000); in plusNanos_zeroReturnsThis() 126 Duration t = Duration.ofSeconds(-1, 2000000); in plusNanos_zeroSingleton() 132 Duration t = Duration.ofSeconds(1); in minus_zeroReturnsThis() [all …]
|
D | TestClock_Offset.java | 78 private static final Duration OFFSET = Duration.ofSeconds(2);
|
D | TestInstantSource.java | 65 var duration = Duration.ofSeconds(1); 90 var duration = Duration.ofSeconds(120);
|
/libcore/ojluni/src/main/java/java/time/ |
D | Duration.java | 218 public static Duration ofSeconds(long seconds) { in ofSeconds() method in Duration 241 public static Duration ofSeconds(long seconds, long nanoAdjustment) { in ofSeconds() method in Duration 441 return ofSeconds(seconds, nanos).negated(); in create() 443 return ofSeconds(seconds, nanos); in create() 484 return ofSeconds(secs, nanos); in between() 816 return ofSeconds(epochSec, nanoAdjustment); in plus() 1023 return ofSeconds(divRem[0].longValue(), divRem[1].intValue()); in create() 1516 return Duration.ofSeconds(seconds, nanos); in readExternal()
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | TimeUnit8Test.java | 118 assertEquals(n, SECONDS.convert(Duration.ofSeconds(n))); in testConvertDuration_roundtripDurationOf() 153 Duration maxDuration = Duration.ofSeconds(Long.MAX_VALUE, 999_999_999); in testConvertDuration_nearOverflow() 154 Duration minDuration = Duration.ofSeconds(Long.MIN_VALUE, 0); in testConvertDuration_nearOverflow()
|
/libcore/ojluni/src/test/java/time/tck/java/time/serial/ |
D | TCKDurationSerialization.java | 102 assertSerializedBySer(Duration.ofSeconds(654321, 123456789), bytes); in test_serialization_format()
|
D | TCKClockSerialization.java | 85 private static final Duration AMOUNT = Duration.ofSeconds(2);
|
/libcore/luni/src/test/java/libcore/java/util/concurrent/ |
D | RecursiveTaskTest.java | 51 if(!TestUtils.waitWhileTrueOrTimeout(Duration.ofSeconds(10), in waitForCompletion()
|
D | ReentrantReadWriteLockTest.java | 80 if(!TestUtils.waitWhileTrueOrTimeout(Duration.ofSeconds(2), in waitForQueuedThread()
|
/libcore/luni/src/test/java/libcore/java/time/ |
D | DurationTest.java | 45 public static final Duration MAX_DURATION = Duration.ofSeconds(Long.MAX_VALUE, 999_999_999); 139 Duration second = Duration.ofSeconds(1); in test_addTo_subtractFrom_unsupported()
|
/libcore/ojluni/annotations/hiddenapi/java/time/ |
D | Duration.java | 89 public static java.time.Duration ofSeconds(long seconds) { in ofSeconds() method in Duration 93 public static java.time.Duration ofSeconds(long seconds, long nanoAdjustment) { in ofSeconds() method in Duration
|
/libcore/ojluni/src/main/java/java/time/zone/ |
D | ZoneOffsetTransition.java | 329 return Duration.ofSeconds(getDurationSeconds()); in getDuration()
|
D | ZoneRules.java | 811 … return Duration.ofSeconds(actualOffset.getTotalSeconds() - standardOffset.getTotalSeconds()); in getDaylightSavings()
|
/libcore/api/ |
D | current.txt | 11447 method public static java.time.Duration ofSeconds(long); 11448 method public static java.time.Duration ofSeconds(long, long);
|