/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);
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
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 | 685 {SECONDS, Duration.ofSeconds(20, 40), 21, 40}, 686 {NANOS, Duration.ofSeconds(30, 300), 31, 300}, 916 …Instant i = Instant.ofEpochSecond(seconds, nanos).plus(Duration.ofSeconds(otherSeconds, otherNanos… 924 i.plus(Duration.ofSeconds(0, 1)); 930 i.plus(Duration.ofSeconds(-1, 999999999)); 1416 …Instant i = Instant.ofEpochSecond(seconds, nanos).minus(Duration.ofSeconds(otherSeconds, otherNano… 1424 i.minus(Duration.ofSeconds(0, 1)); 1430 i.minus(Duration.ofSeconds(-1, 999999999));
|
D | TCKYear.java | 509 {Duration.ofSeconds(1)}, in data_plusInvalidUnit() 641 {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 | 936 Duration dur = Duration.ofSeconds(62, 3); 1047 Duration dur = Duration.ofSeconds(62, 3);
|
D | TCKZonedDateTime.java | 1649 Duration duration = Duration.ofSeconds(4L * 60 * 60 + 5L * 60 + 6L); 1854 Duration duration = Duration.ofSeconds(4L * 60 * 60 + 5L * 60 + 6L);
|
/libcore/ojluni/src/main/java/java/time/ |
D | Duration.java | 217 public static Duration ofSeconds(long seconds) { in ofSeconds() method in Duration 240 public static Duration ofSeconds(long seconds, long nanoAdjustment) { in ofSeconds() method in Duration 440 return ofSeconds(seconds, nanos).negated(); in create() 442 return ofSeconds(seconds, nanos); in create() 483 return ofSeconds(secs, nanos); in between() 815 return ofSeconds(epochSec, nanoAdjustment); in plus() 1022 return ofSeconds(divRem[0].longValue(), divRem[1].intValue()); in create() 1516 return Duration.ofSeconds(seconds, nanos); in readExternal()
|
/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/ojluni/src/test/java/time/tck/java/time/serial/ |
D | TCKClockSerialization.java | 85 private static final Duration AMOUNT = Duration.ofSeconds(2);
|
/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 | 322 return Duration.ofSeconds(getDurationSeconds()); in getDuration()
|
D | ZoneRules.java | 786 … return Duration.ofSeconds(actualOffset.getTotalSeconds() - standardOffset.getTotalSeconds()); in getDaylightSavings()
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | IsoFields.java | 649 WEEK_BASED_YEARS("WeekBasedYears", Duration.ofSeconds(31556952L)), 653 QUARTER_YEARS("QuarterYears", Duration.ofSeconds(31556952L / 4));
|