Home
last modified time | relevance | path

Searched refs:plusNanos (Results 1 – 22 of 22) sorted by relevance

/libcore/ojluni/src/main/java/java/time/
DDuration.java702 case NANOS: return plusNanos(amountToAdd); in plus()
703 …e MICROS: return plusSeconds((amountToAdd / (1000_000L * 1000)) * 1000).plusNanos((amountToAdd % (… in plus()
710 return plusSeconds(duration.getSeconds()).plusNanos(duration.getNano()); in plus()
791 public Duration plusNanos(long nanosToAdd) { in plusNanos() method in Duration
937 …return (nanosToSubtract == Long.MIN_VALUE ? plusNanos(Long.MAX_VALUE).plusNanos(1) : plusNanos(-na… in minusNanos()
DInstant.java756 return plusNanos(result - nod); in truncatedTo()
847 case NANOS: return plusNanos(amountToAdd); in plus()
900 public Instant plusNanos(long nanosToAdd) { in plusNanos() method in Instant
1023 return plusNanos(Long.MAX_VALUE).plusNanos(1); in minusNanos()
1025 return plusNanos(-nanosToSubtract); in minusNanos()
DOffsetDateTime.java1324 public OffsetDateTime plusNanos(long nanos) { in plusNanos() method in OffsetDateTime
1325 return with(dateTime.plusNanos(nanos), offset); in plusNanos()
1514 … return (nanos == Long.MIN_VALUE ? plusNanos(Long.MAX_VALUE).plusNanos(1) : plusNanos(-nanos)); in minusNanos()
DLocalTime.java1041 case NANOS: return plusNanos(amountToAdd); in plus()
1042 case MICROS: return plusNanos((amountToAdd % MICROS_PER_DAY) * 1000); in plus()
1043 case MILLIS: return plusNanos((amountToAdd % MILLIS_PER_DAY) * 1000_000); in plus()
1137 public LocalTime plusNanos(long nanosToAdd) { in plusNanos() method in LocalTime
1261 return plusNanos(-(nanosToSubtract % NANOS_PER_DAY)); in minusNanos()
DZonedDateTime.java1772 public ZonedDateTime plusNanos(long nanos) { in plusNanos() method in ZonedDateTime
1773 return resolveInstant(dateTime.plusNanos(nanos)); in plusNanos()
2014 … return (nanos == Long.MIN_VALUE ? plusNanos(Long.MAX_VALUE).plusNanos(1) : plusNanos(-nanos)); in minusNanos()
DLocalDateTime.java1180 case NANOS: return plusNanos(amountToAdd); in plus()
1181 …case MICROS: return plusDays(amountToAdd / MICROS_PER_DAY).plusNanos((amountToAdd % MICROS_PER_DAY… in plus()
1182 …case MILLIS: return plusDays(amountToAdd / MILLIS_PER_DAY).plusNanos((amountToAdd % MILLIS_PER_DAY… in plus()
1333 public LocalDateTime plusNanos(long nanos) { in plusNanos() method in LocalDateTime
DOffsetTime.java936 public OffsetTime plusNanos(long nanos) { in plusNanos() method in OffsetTime
937 return with(time.plusNanos(nanos), offset); in plusNanos()
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoLocalDateTimeImpl.java308 case NANOS: return plusNanos(amountToAdd); in plus()
309 …case MICROS: return plusDays(amountToAdd / MICROS_PER_DAY).plusNanos((amountToAdd % MICROS_PER_DAY… in plus()
310 …case MILLIS: return plusDays(amountToAdd / MILLIS_PER_DAY).plusNanos((amountToAdd % MILLIS_PER_DAY… in plus()
337 private ChronoLocalDateTimeImpl<D> plusNanos(long nanos) { in plusNanos() method in ChronoLocalDateTimeImpl
/libcore/ojluni/src/test/java/time/test/java/time/
DTestDuration.java121 assertSame(t.plusNanos(0), t); in plusNanos_zeroReturnsThis()
127 assertSame(t.plusNanos(998000000), Duration.ZERO); in plusNanos_zeroSingleton()
DTestLocalDateTime.java332 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusNanos(0); in test_plusNanos_noChange()
338 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusNanos(24 * 60 * 60 * 1000000000L); in test_plusNanos_noChange_oneDay_same()
344 …Time t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(23, 59, 59, 999999999)).plusNanos(1); in test_plusNanos_toMidnight()
350 …Time t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(11, 59, 59, 999999999)).plusNanos(1); in test_plusNanos_toMidday()
DTestOffsetDateTime.java258 OffsetDateTime test = base.plusNanos(0); in test_plusNanos_zero()
/libcore/luni/src/test/java/libcore/java/time/
DDurationTest.java75 { Instant.EPOCH, Duration.between(Instant.EPOCH, Instant.MAX).plusNanos(1) }, in test_addTo_exceeds()
102 { Instant.EPOCH, Duration.between(Instant.MIN, Instant.EPOCH).plusNanos(1) }, in test_subtractFrom_exceeds()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKLocalTime.java1712 t = t.plusNanos(500000000); in test_plusNanos_halfABillion()
1783 LocalTime t = base.plusNanos(nanoseconds);
1793 LocalTime t = TEST_12_30_40_987654321.plusNanos(0);
1799 LocalTime t = TEST_12_30_40_987654321.plusNanos(24 * 60 * 60 * 1000000000L);
1805 LocalTime t = LocalTime.of(23, 59, 59, 999999999).plusNanos(1);
1811 LocalTime t = LocalTime.of(11, 59, 59, 999999999).plusNanos(1);
2421 t = t.plusNanos(1);
2435 t = t.plusNanos(1);
DTCKInstant.java208 Instant expected = Instant.ofEpochSecond(i).plusNanos(123456789L);
218 Instant expected = Instant.ofEpochSecond(i).plusNanos(123456789L);
1195 t = t.plusNanos(amount);
1203 t.plusNanos(1);
1209 t.plusNanos(-1);
DTCKOffsetDateTime.java260 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
277 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
293 LocalTime expected = LocalTime.MIDNIGHT.plusNanos(123456789L);
295 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
1028 OffsetDateTime test = base.plusNanos(1);
DTCKZonedDateTime.java277 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
296 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
306 LocalTime expected = LocalTime.MIDNIGHT.plusNanos(123456789L);
308 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
1815 assertEquals(base.plusNanos(amount * 3600_000_000_000L), expected);
1822 ZonedDateTime test = base.plusNanos(1);
1823 assertEquals(test, ZonedDateTime.of(ldt.plusNanos(1), ZONE_0100));
DTCKDuration.java1504 t = t.plusNanos(amount); in plusNanos_long()
1512 t.plusNanos(1); in plusNanos_long_overflowTooBig()
1518 t.plusNanos(-1); in plusNanos_long_overflowTooSmall()
2431 Duration test = Duration.ofSeconds(0, Long.MAX_VALUE).plusNanos(1); in test_toNanos_tooBig()
DTCKLocalDateTime.java309 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
325 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
340 LocalTime expected = LocalTime.MIDNIGHT.plusNanos(123456789L);
342 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
1974 t = t.plusNanos(500000000);
2050 LocalDateTime t = base.plusNanos(nanoseconds);
2061 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusNanos(24 * 60 * 60 * 1000000000L);
DTCKOffsetTime.java967 OffsetTime test = base.plusNanos(1);
974 OffsetTime test = base.plusNanos(0);
/libcore/ojluni/annotations/hiddenapi/java/time/
DDuration.java209 public java.time.Duration plusNanos(long nanosToAdd) { in plusNanos() method in Duration
DOffsetDateTime.java309 public java.time.OffsetDateTime plusNanos(long nanos) { in plusNanos() method in OffsetDateTime
/libcore/ojluni/src/test/java/time/tck/java/time/zone/
DTCKZoneRules.java456 assertEquals(test.previousTransition(prev.getInstant().plusNanos(1)), prev); in test_London_previousTransition_historic()
467 assertEquals(test.previousTransition(last.getInstant().plusNanos(1)), last); in test_London_previousTransition_rulesBased()
482 assertEquals(test.previousTransition(b.getInstant().plusNanos(1)), b); in test_London_previousTransition_rulesBased()
486 assertEquals(test.previousTransition(a.getInstant().plusNanos(1)), a); in test_London_previousTransition_rulesBased()