Home
last modified time | relevance | path

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

12

/libcore/ojluni/src/test/java/util/concurrent/tck/
DTimeUnit8Test.java67 assertSame(ChronoUnit.NANOS, NANOSECONDS.toChronoUnit()); in testToChronoUnit()
84 assertSame(NANOSECONDS, TimeUnit.of(ChronoUnit.NANOS)); in testTimeUnitOf()
115 assertEquals(n, NANOSECONDS.convert(Duration.of(n, ChronoUnit.NANOS))); in testConvertDuration_roundtripDurationOf()
152 ChronoUnit NANOS = ChronoUnit.NANOS; in testConvertDuration_nearOverflow() local
171 assertEquals(Long.MAX_VALUE - 1, u.convert(max.minus(1, NANOS))); in testConvertDuration_nearOverflow()
174 assertEquals(Long.MIN_VALUE + 1, u.convert(min.plus(1, NANOS))); in testConvertDuration_nearOverflow()
176 assertEquals(Long.MAX_VALUE, u.convert(max.plus(1, NANOS))); in testConvertDuration_nearOverflow()
179 assertEquals(Long.MIN_VALUE, u.convert(min.minus(1, NANOS))); in testConvertDuration_nearOverflow()
/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…
685 {NANOS, MockSimplePeriod.of(6, NANOS), 1, 6},
690 {NANOS, MockSimplePeriod.of(14, NANOS), 1, 14},
692 {NANOS, Duration.ofSeconds(30, 300), 31, 300},
942 …tant i = Instant.ofEpochSecond(seconds, nanos).plus(otherSeconds, SECONDS).plus(otherNanos, NANOS);
950 i.plus(1, NANOS);
956 i.plus(999999999, NANOS);
1442 …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()
1162 t = t.plus(1, NANOS); in plus_longTemporalUnit_nanos()
[all …]
DTCKLocalDateTime.java100 import static java.time.temporal.ChronoUnit.NANOS;
954 assertEquals(TEST_2007_07_15_12_30_40_987654321.isSupported(ChronoUnit.NANOS), true);
1017 {TEST_2007_07_15_12_30_40_987654321, TemporalQueries.precision(), ChronoUnit.NANOS},
1360 …assertEquals(TEST_2007_07_15_12_30_40_987654321.truncatedTo(NANOS), TEST_2007_07_15_12_30_40_98765…
2799 {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), NANOS, 0},
2807 {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), NANOS, 2 * 3600 * 1_000_000_000L},
2815 {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), NANOS, 14 * 3600 * 1_000_000_000L},
2823 …{dtEpoch(0, 0, 0, 0), dtEpoch(2, 30, 40, 1500), NANOS, (2 * 3600 + 30 * 60 + 40) * 1_000_000_000L …
2831 {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 499), NANOS, -1},
2832 {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;
552 assertEquals(TEST_11_30_59_500_PONE.isSupported(ChronoUnit.NANOS), true);
607 {TEST_11_30_59_500_PONE, TemporalQueries.precision(), ChronoUnit.NANOS},
865 assertEquals(TEST_11_30_59_500_PONE.truncatedTo(NANOS), TEST_11_30_59_500_PONE);
1077 …Time.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(2, 1, 1, 0, OFFSET_PONE), NANOS, 3600*1000*1000L*1…
1085 …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;
630 assertEquals(TEST_12_30_40_987654321.isSupported(ChronoUnit.NANOS), true); in test_isSupported_TemporalUnit()
691 {TEST_12_30_40_987654321, TemporalQueries.precision(), ChronoUnit.NANOS}, in data_query()
1378 {LocalTime.of(1, 2, 3, 123_456_789), NANOS, LocalTime.of(1, 2, 3, 123_456_789)}, in data_truncatedToValid()
2297 {time(0, 0, 0, 0), time(0, 0, 0, 0), NANOS, 0},
2305 {time(0, 0, 0, 0), time(2, 0, 0, 0), NANOS, 2 * 3600 * 1_000_000_000L},
2313 {time(0, 0, 0, 0), time(14, 0, 0, 0), NANOS, 14 * 3600 * 1_000_000_000L},
2321 …{time(0, 0, 0, 0), time(2, 30, 40, 1500), NANOS, (2 * 3600 + 30 * 60 + 40) * 1_000_000_000L + 1500…
/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;
470 return ofNanos(startInclusive.until(endExclusive, NANOS)); in between()
531 } else if (unit == NANOS) { in get()
562 Collections.unmodifiableList(Arrays.<TemporalUnit>asList(SECONDS, NANOS));
705 case NANOS: return plusNanos(amountToAdd); in plus()
1088 temporal = temporal.plus(nanos, NANOS); in addTo()
1123 temporal = temporal.minus(nanos, NANOS); in subtractFrom()
1348 } else if (unit == ChronoUnit.NANOS) { in truncatedTo()
DInstant.java73 import static java.time.temporal.ChronoUnit.NANOS;
742 if (unit == ChronoUnit.NANOS) { in truncatedTo()
846 case NANOS: return plusNanos(amountToAdd); in plus()
1050 return (R) NANOS; in query()
1140 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;
1081 return (R) NANOS; in query()
1177 case NANOS: return nanosUntil; in until()
/libcore/ojluni/src/main/java/java/time/temporal/
DChronoField.java79 import static java.time.temporal.ChronoUnit.NANOS;
133 NANO_OF_SECOND("NanoOfSecond", NANOS, SECONDS, ValueRange.of(0, 999_999_999)),
149 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/util/concurrent/
DTimeUnit.java458 case NANOSECONDS: return ChronoUnit.NANOS; in toChronoUnit()
481 case NANOS: return TimeUnit.NANOSECONDS; in of()
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoLocalDateTime.java67 import static java.time.temporal.ChronoUnit.NANOS;
351 return (R) NANOS; in query()
DChronoZonedDateTime.java67 import static java.time.temporal.ChronoUnit.NANOS;
500 return (R) NANOS; in query()
DChronoLocalDateTimeImpl.java303 case NANOS: return plusNanos(amountToAdd); in plus()
374 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