Home
last modified time | relevance | path

Searched refs:NANOS (Results 1 – 25 of 31) 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.java68 import static java.time.temporal.ChronoUnit.NANOS;
337 {0, NANOS, 0, 0}, in provider_factory_of_longTemporalUnit()
345 {1, NANOS, 0, 1}, in provider_factory_of_longTemporalUnit()
353 {3, NANOS, 0, 3}, in provider_factory_of_longTemporalUnit()
361 {-1, NANOS, -1, 999999999}, in provider_factory_of_longTemporalUnit()
369 {-3, NANOS, -1, 999999997}, in provider_factory_of_longTemporalUnit()
377 … {Long.MAX_VALUE, NANOS, Long.MAX_VALUE / 1000000000, (int) (Long.MAX_VALUE % 1000000000)}, in provider_factory_of_longTemporalUnit()
378 …{Long.MIN_VALUE, NANOS, Long.MIN_VALUE / 1000000000 - 1, (int) (Long.MIN_VALUE % 1000000000 + 1000… in provider_factory_of_longTemporalUnit()
452 list.add(NANOS); in factory_from_TemporalAmount_DaysNanos()
1135 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;
602 assertEquals(TEST_12_30_40_987654321.isSupported(ChronoUnit.NANOS), true); in test_isSupported_TemporalUnit()
663 {TEST_12_30_40_987654321, TemporalQueries.precision(), ChronoUnit.NANOS}, in data_query()
1350 {LocalTime.of(1, 2, 3, 123_456_789), NANOS, LocalTime.of(1, 2, 3, 123_456_789)}, in data_truncatedToValid()
2269 {time(0, 0, 0, 0), time(0, 0, 0, 0), NANOS, 0},
2277 {time(0, 0, 0, 0), time(2, 0, 0, 0), NANOS, 2 * 3600 * 1_000_000_000L},
2285 {time(0, 0, 0, 0), time(14, 0, 0, 0), NANOS, 14 * 3600 * 1_000_000_000L},
2293 …{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/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/luni/src/test/java/libcore/java/time/
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()
DOffsetDateTimeTest.java54 ODT.plus(1, ChronoUnit.NANOS)); in test_plus()
DInstantTest.java36 assertEquals(true, Instant.EPOCH.isSupported(ChronoUnit.NANOS)); in test_isSupported_TemporalUnit()
/libcore/ojluni/src/main/java/java/time/
DDuration.java70 import static java.time.temporal.ChronoUnit.NANOS;
467 return ofNanos(startInclusive.until(endExclusive, NANOS)); in between()
528 } else if (unit == NANOS) { in get()
559 Collections.unmodifiableList(Arrays.<TemporalUnit>asList(SECONDS, NANOS));
702 case NANOS: return plusNanos(amountToAdd); in plus()
1067 temporal = temporal.plus(nanos, NANOS); in addTo()
1102 temporal = temporal.minus(nanos, NANOS); in subtractFrom()
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;
944 if (unit == ChronoUnit.NANOS) { in truncatedTo()
1041 case NANOS: return plusNanos(amountToAdd); in plus()
1294 return (R) NANOS; in query()
1383 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