Home
last modified time | relevance | path

Searched refs:NANOS (Results 1 – 25 of 32) sorted by relevance

12

/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestChronologyPerf.java46 Duration d = Duration.of(end - start, ChronoUnit.NANOS); in test_chronologyGetAvailablePerf()
52 d = Duration.of(end - start, ChronoUnit.NANOS); in test_chronologyGetAvailablePerf()
58 d = Duration.of(end - start, ChronoUnit.NANOS); in test_chronologyGetAvailablePerf()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKInstant.java72 import static java.time.temporal.ChronoUnit.NANOS;
410 {TEST_12345_123456789, TemporalQueries.precision(), NANOS},
631 …{Instant.ofEpochSecond(86400 + 3600 + 60 + 1, 123_456_789), NANOS, Instant.ofEpochSecond(86400 + 3…
679 {NANOS, MockSimplePeriod.of(6, NANOS), 1, 6},
684 {NANOS, MockSimplePeriod.of(14, NANOS), 1, 14},
686 {NANOS, Duration.ofSeconds(30, 300), 31, 300},
936 …tant i = Instant.ofEpochSecond(seconds, nanos).plus(otherSeconds, SECONDS).plus(otherNanos, NANOS);
944 i.plus(1, NANOS);
950 i.plus(999999999, NANOS);
1436 …nt i = Instant.ofEpochSecond(seconds, nanos).minus(otherSeconds, SECONDS).minus(otherNanos, NANOS);
[all …]
DTCKDuration.java69 import static java.time.temporal.ChronoUnit.NANOS;
339 {0, NANOS, 0, 0}, in provider_factory_of_longTemporalUnit()
347 {1, NANOS, 0, 1}, in provider_factory_of_longTemporalUnit()
355 {3, NANOS, 0, 3}, in provider_factory_of_longTemporalUnit()
363 {-1, NANOS, -1, 999999999}, in provider_factory_of_longTemporalUnit()
371 {-3, NANOS, -1, 999999997}, in provider_factory_of_longTemporalUnit()
379 … {Long.MAX_VALUE, NANOS, Long.MAX_VALUE / 1000000000, (int) (Long.MAX_VALUE % 1000000000)}, in provider_factory_of_longTemporalUnit()
380 …{Long.MIN_VALUE, NANOS, Long.MIN_VALUE / 1000000000 - 1, (int) (Long.MIN_VALUE % 1000000000 + 1000… in provider_factory_of_longTemporalUnit()
454 list.add(NANOS); in factory_from_TemporalAmount_DaysNanos()
1137 t = t.plus(1, NANOS); in plus_longTemporalUnit_nanos()
[all …]
DTCKLocalDateTime.java100 import static java.time.temporal.ChronoUnit.NANOS;
960 assertEquals(TEST_2007_07_15_12_30_40_987654321.isSupported(ChronoUnit.NANOS), true);
1023 {TEST_2007_07_15_12_30_40_987654321, TemporalQueries.precision(), ChronoUnit.NANOS},
1366 …assertEquals(TEST_2007_07_15_12_30_40_987654321.truncatedTo(NANOS), TEST_2007_07_15_12_30_40_98765…
2805 {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), NANOS, 0},
2813 {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), NANOS, 2 * 3600 * 1_000_000_000L},
2821 {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), NANOS, 14 * 3600 * 1_000_000_000L},
2829 …{dtEpoch(0, 0, 0, 0), dtEpoch(2, 30, 40, 1500), NANOS, (2 * 3600 + 30 * 60 + 40) * 1_000_000_000L …
2837 {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 499), NANOS, -1},
2838 {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 500), NANOS, 0},
[all …]
DTCKOffsetTime.java85 import static java.time.temporal.ChronoUnit.NANOS;
560 assertEquals(TEST_11_30_59_500_PONE.isSupported(ChronoUnit.NANOS), true);
615 {TEST_11_30_59_500_PONE, TemporalQueries.precision(), ChronoUnit.NANOS},
873 assertEquals(TEST_11_30_59_500_PONE.truncatedTo(NANOS), TEST_11_30_59_500_PONE);
1085 …Time.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(2, 1, 1, 0, OFFSET_PONE), NANOS, 3600*1000*1000L*1…
1093 …Time.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(3, 1, 1, 0, OFFSET_PTWO), NANOS, 3600*1000*1000L*1…
DTCKLocalTime.java85 import static java.time.temporal.ChronoUnit.NANOS;
636 assertEquals(TEST_12_30_40_987654321.isSupported(ChronoUnit.NANOS), true); in test_isSupported_TemporalUnit()
697 {TEST_12_30_40_987654321, TemporalQueries.precision(), ChronoUnit.NANOS}, in data_query()
1384 {LocalTime.of(1, 2, 3, 123_456_789), NANOS, LocalTime.of(1, 2, 3, 123_456_789)}, in data_truncatedToValid()
2303 {time(0, 0, 0, 0), time(0, 0, 0, 0), NANOS, 0},
2311 {time(0, 0, 0, 0), time(2, 0, 0, 0), NANOS, 2 * 3600 * 1_000_000_000L},
2319 {time(0, 0, 0, 0), time(14, 0, 0, 0), NANOS, 14 * 3600 * 1_000_000_000L},
2327 …{time(0, 0, 0, 0), time(2, 30, 40, 1500), NANOS, (2 * 3600 + 30 * 60 + 40) * 1_000_000_000L + 1500…
DTCKOffsetDateTime.java101 import static java.time.temporal.ChronoUnit.NANOS;
577 assertEquals(TEST_2008_6_30_11_30_59_000000500.isSupported(ChronoUnit.NANOS), true);
645 {TEST_2008_6_30_11_30_59_000000500, TemporalQueries.precision(), ChronoUnit.NANOS},
911 …assertEquals(TEST_2008_6_30_11_30_59_000000500.truncatedTo(NANOS), TEST_2008_6_30_11_30_59_0000005…
1155 …0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 2, 1, 1, 0, OFFSET_PONE), NANOS, 3600*1000*1000L*1…
1163 …0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 3, 1, 1, 0, OFFSET_PTWO), NANOS, 3600*1000*1000L*1…
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKChronoUnit.java71 import static java.time.temporal.ChronoUnit.NANOS;
117 {NANOS, false, true, false}, in data_chronoUnit()
148 {NANOS, LocalTime.of(1, 2, 3, 400), true, 1, LocalTime.of(1, 2, 3, 1 + 400)}, in data_unitAndTemporal()
163 {NANOS, LocalDate.of(2000, 2, 29), false, 1, null}, in data_unitAndTemporal()
DTCKChronoField.java94 import static java.time.temporal.ChronoUnit.NANOS;
139 {NANO_OF_SECOND, NANOS, SECONDS}, in data_fieldUnit()
140 {NANO_OF_DAY, NANOS, DAYS}, in data_fieldUnit()
/libcore/luni/src/test/java/libcore/java/time/
DOffsetDateTimeTest.java54 ODT.plus(1, ChronoUnit.NANOS)); in test_plus()
70 ODT.minus(1, ChronoUnit.NANOS)); in test_minus_utc_offset()
90 odt.minus(1, ChronoUnit.NANOS)); in test_minus_non_utc_offset()
DOffsetTimeTest.java56 NOON_UTC.plus(1, ChronoUnit.NANOS)); in test_plus()
67 assertPlusIsNoop(24 * 60 * 60 * 1_000_000_000L, ChronoUnit.NANOS); in test_plus_noop()
DInstantTest.java36 assertEquals(true, Instant.EPOCH.isSupported(ChronoUnit.NANOS)); in test_isSupported_TemporalUnit()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/
DTCKChronoUnitSerialization.java71 import static java.time.temporal.ChronoUnit.NANOS;
112 {NANOS}, in data_chronoUnit()
/libcore/ojluni/src/main/java/java/time/
DDuration.java72 import static java.time.temporal.ChronoUnit.NANOS;
469 return ofNanos(startInclusive.until(endExclusive, NANOS)); in between()
530 } else if (unit == NANOS) { in get()
561 Collections.unmodifiableList(Arrays.<TemporalUnit>asList(SECONDS, NANOS));
704 case NANOS: return plusNanos(amountToAdd); in plus()
1087 temporal = temporal.plus(nanos, NANOS); in addTo()
1122 temporal = temporal.minus(nanos, NANOS); in subtractFrom()
1347 } else if (unit == ChronoUnit.NANOS) { in truncatedTo()
DInstant.java73 import static java.time.temporal.ChronoUnit.NANOS;
743 if (unit == ChronoUnit.NANOS) { in truncatedTo()
847 case NANOS: return plusNanos(amountToAdd); in plus()
1051 return (R) NANOS; in query()
1142 case NANOS: return nanosUntil(end); in until()
DLocalTime.java71 import static java.time.temporal.ChronoUnit.NANOS;
967 if (unit == ChronoUnit.NANOS) { in truncatedTo()
1064 case NANOS: return plusNanos(amountToAdd); in plus()
1317 return (R) NANOS; in query()
1406 case NANOS: return nanosUntil; in until()
DOffsetTime.java70 import static java.time.temporal.ChronoUnit.NANOS;
1080 return (R) NANOS; in query()
1176 case NANOS: return nanosUntil; in until()
DOffsetDateTime.java69 import static java.time.temporal.ChronoUnit.NANOS;
1550 return (R) NANOS; in query()
/libcore/ojluni/src/main/java/java/time/temporal/
DChronoField.java79 import static java.time.temporal.ChronoUnit.NANOS;
122 NANO_OF_SECOND("NanoOfSecond", NANOS, SECONDS, ValueRange.of(0, 999_999_999)),
138 NANO_OF_DAY("NanoOfDay", NANOS, DAYS, ValueRange.of(0, 86400L * 1000_000_000L - 1)),
DChronoUnit.java83 NANOS("Nanos", Duration.ofNanos(1)), enumConstant
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoLocalDateTime.java67 import static java.time.temporal.ChronoUnit.NANOS;
344 return (R) NANOS; in query()
DChronoZonedDateTime.java67 import static java.time.temporal.ChronoUnit.NANOS;
493 return (R) NANOS; in query()
DChronoLocalDateTimeImpl.java308 case NANOS: return plusNanos(amountToAdd); in plus()
379 case NANOS: amount = Math.multiplyExact(amount, NANOS_PER_DAY); break; in until()
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKChronoLocalDateTime.java274 dates.add(date.minus(1, ChronoUnit.NANOS)); in test_datetime_comparisons()
276 dates.add(date.plus(1, ChronoUnit.NANOS)); in test_datetime_comparisons()
DTCKChronoZonedDateTime.java277 dates.add(date.minus(1, ChronoUnit.NANOS)); in test_zonedDateTime_comparisons()
279 dates.add(date.plus(1, ChronoUnit.NANOS)); in test_zonedDateTime_comparisons()

12