Home
last modified time | relevance | path

Searched refs:ofSeconds (Results 1 – 18 of 18) sorted by relevance

/libcore/ojluni/src/test/java/time/test/java/time/
DTestDuration.java84 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 …]
DTestClock_Offset.java78 private static final Duration OFFSET = Duration.ofSeconds(2);
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKClock_Tick.java124 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()
DTCKClock_Offset.java83 private static final Duration OFFSET = Duration.ofSeconds(2);
DTCKInstant.java685 {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));
DTCKYear.java509 {Duration.ofSeconds(1)}, in data_plusInvalidUnit()
641 {Duration.ofSeconds(1)}, in data_minusInvalidUnit()
DTCKYearMonth.java821 {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()
DTCKOffsetDateTime.java936 Duration dur = Duration.ofSeconds(62, 3);
1047 Duration dur = Duration.ofSeconds(62, 3);
DTCKZonedDateTime.java1649 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/
DDuration.java217 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/
DRecursiveTaskTest.java51 if(!TestUtils.waitWhileTrueOrTimeout(Duration.ofSeconds(10), in waitForCompletion()
DReentrantReadWriteLockTest.java80 if(!TestUtils.waitWhileTrueOrTimeout(Duration.ofSeconds(2), in waitForQueuedThread()
/libcore/ojluni/src/test/java/time/tck/java/time/serial/
DTCKClockSerialization.java85 private static final Duration AMOUNT = Duration.ofSeconds(2);
/libcore/luni/src/test/java/libcore/java/time/
DDurationTest.java45 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/
DDuration.java89 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/
DZoneOffsetTransition.java322 return Duration.ofSeconds(getDurationSeconds()); in getDuration()
DZoneRules.java786 … return Duration.ofSeconds(actualOffset.getTotalSeconds() - standardOffset.getTotalSeconds()); in getDaylightSavings()
/libcore/ojluni/src/main/java/java/time/temporal/
DIsoFields.java649 WEEK_BASED_YEARS("WeekBasedYears", Duration.ofSeconds(31556952L)),
653 QUARTER_YEARS("QuarterYears", Duration.ofSeconds(31556952L / 4));