/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 | 649 WEEK_BASED_YEARS("WeekBasedYears", Duration.ofSeconds(31556952L)), 653 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);
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKDuration.java | 122 Duration t = Duration.ofSeconds(i); in factory_seconds_long() 135 Duration t = Duration.ofSeconds(i, j); in factory_seconds_long_long() 140 Duration t = Duration.ofSeconds(i, j); in factory_seconds_long_long() 145 Duration t = Duration.ofSeconds(i, j); in factory_seconds_long_long() 154 Duration test = Duration.ofSeconds(2L, -1); in factory_seconds_long_long_nanosNegativeAdjusted() 161 Duration.ofSeconds(Long.MAX_VALUE, 1000000000); in factory_seconds_long_long_tooBig() 651 assertEquals(test, Duration.ofSeconds(expectedSeconds, expectedNanoOfSecond).negated()); in factory_parse_minus() 851 assertEquals(Duration.between(start, end), Duration.ofSeconds(3)); in factory_between_TemporalTemporal_mixedTypes() 879 assertEquals(Duration.ofSeconds(0).isZero(), true); in test_isZero() 881 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 | 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 | 215 public static Duration ofSeconds(long seconds) { in ofSeconds() method in Duration 238 public static Duration ofSeconds(long seconds, long nanoAdjustment) { in ofSeconds() method in Duration 438 return ofSeconds(seconds, nanos).negated(); in create() 440 return ofSeconds(seconds, nanos); in create() 481 return ofSeconds(secs, nanos); in between() 813 return ofSeconds(epochSec, nanoAdjustment); in plus() 1002 return ofSeconds(divRem[0].longValue(), divRem[1].intValue()); in create() 1338 return Duration.ofSeconds(seconds, nanos); in readExternal()
|
/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/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()
|