Home
last modified time | relevance | path

Searched refs:period (Results 1 – 25 of 41) sorted by relevance

12

/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKChronoPeriod.java107 ChronoPeriod period = chrono.period(1, 2, 3); in test_serialization() local
110 out.writeObject(period); in test_serialization()
116 assertEquals(ser, period, "deserialized ChronoPeriod is wrong"); in test_serialization()
121 ChronoPeriod period = chrono.period(1, 2, 3); in test_get() local
122 assertEquals(period.get(YEARS), 1); in test_get()
123 assertEquals(period.get(MONTHS), 2); in test_get()
124 assertEquals(period.get(DAYS), 3); in test_get()
129 ChronoPeriod period = chrono.period(1, 2, 3); in test_get_unsupported() local
130 period.get(HOURS); in test_get_unsupported()
135 ChronoPeriod period = chrono.period(1, 2, 3); in test_getUnits() local
[all …]
/libcore/ojluni/src/main/java/java/util/
DTimer.java262 public void schedule(TimerTask task, long delay, long period) { in schedule() argument
265 if (period <= 0) in schedule()
267 sched(task, System.currentTimeMillis()+delay, -period); in schedule()
303 public void schedule(TimerTask task, Date firstTime, long period) { in schedule() argument
304 if (period <= 0) in schedule()
306 sched(task, firstTime.getTime(), -period); in schedule()
342 public void scheduleAtFixedRate(TimerTask task, long delay, long period) { in scheduleAtFixedRate() argument
345 if (period <= 0) in scheduleAtFixedRate()
347 sched(task, System.currentTimeMillis()+delay, period); in scheduleAtFixedRate()
386 long period) { in scheduleAtFixedRate() argument
[all …]
DTimerTask.java85 long period = 0; field in TimerTask
158 return (period < 0 ? nextExecutionTime + period in scheduledExecutionTime()
159 : nextExecutionTime - period); in scheduledExecutionTime()
/libcore/luni/src/test/java/libcore/java/time/chrono/
DThaiBuddhistDateTest.java40 ChronoPeriod period = ThaiBuddhistChronology.INSTANCE.period(1, 1, 1); in minus_thaiBuddhistChronologyPeriod() local
42 assertEquals(ThaiBuddhistDate.of(2482, 11, 30), date.minus(period)); in minus_thaiBuddhistChronologyPeriod()
49 ChronoPeriod period = ThaiBuddhistChronology.INSTANCE.period(1, -1, -1); in minus_thaiBuddhistChronologyPeriod_withNegative() local
51 assertEquals(ThaiBuddhistDate.of(2483, 2, 2), date.minus(period)); in minus_thaiBuddhistChronologyPeriod_withNegative()
DHijrahDateTest.java77 now.minus(HijrahChronology.INSTANCE.period(0, 0, 1))); in minus_hijrah_period()
79 now.minus(HijrahChronology.INSTANCE.period(1, 0, 0))); in minus_hijrah_period()
81 now.minus(HijrahChronology.INSTANCE.period(-1, -1, -1))); in minus_hijrah_period()
83 now.minus(HijrahChronology.INSTANCE.period(0, 0, 14))); in minus_hijrah_period()
85 now.minus(HijrahChronology.INSTANCE.period(0, 0, -16))); in minus_hijrah_period()
DMinguoDateTest.java79 date.minus(MinguoChronology.INSTANCE.period(1, 1, 1))); in minus_minguoPeriod()
87 date.minus(MinguoChronology.INSTANCE.period(1, -1, -1))); in minus_minguoPeriod_withNegative()
90 date.minus(MinguoChronology.INSTANCE.period(0, -1, -1))); in minus_minguoPeriod_withNegative()
DChronoPeriodTest.java67 assertEquals(HijrahChronology.INSTANCE.period(0, 0, 2), in between_nonNull()
77 assertEquals(HijrahChronology.INSTANCE.period(0, 0, -1), in between_differentInterfaceImplementations()
DJapaneseDateTest.java120 date.minus(JapaneseChronology.INSTANCE.period(1, 1, 1))); in minus_japanesePeriod()
128 date.minus(JapaneseChronology.INSTANCE.period(-1, -3, -5))); in minus_japanesePeriod_withNegative()
/libcore/ojluni/src/test/java/util/Timer/
DArgs.java47 long period) { in schedule() argument
48 t.schedule(task, d, period); in schedule()
51 () -> t.schedule(task, d, period)); in schedule()
55 Date d, final long period) { in scheduleAtFixedRate() argument
56 t.scheduleAtFixedRate(task, d, period); in scheduleAtFixedRate()
59 () -> t.scheduleAtFixedRate(task, d, period)); in scheduleAtFixedRate()
/libcore/ojluni/src/main/java/java/sql/
DTimestamp.java187 int period = 0; in valueOf() local
214 period = time_s.indexOf('.', secondColon+1); in valueOf()
244 if ((period > 0) & (period < time_s.length()-1)) { in valueOf()
246 Integer.parseInt(time_s.substring(secondColon+1, period)); in valueOf()
247 nanos_s = time_s.substring(period+1); in valueOf()
254 } else if (period > 0) { in valueOf()
/libcore/ojluni/src/main/java/java/util/concurrent/
DScheduledThreadPoolExecutor.java203 private final long period; field in ScheduledThreadPoolExecutor.ScheduledFutureTask
220 this.period = 0; in ScheduledFutureTask()
229 long period, long sequenceNumber) { in ScheduledFutureTask() argument
232 this.period = period; in ScheduledFutureTask()
243 this.period = 0; in ScheduledFutureTask()
276 return period != 0; in isPeriodic()
283 long p = period; in setNextRunTime()
625 long period, in scheduleAtFixedRate() argument
629 if (period <= 0L) in scheduleAtFixedRate()
635 unit.toNanos(period), in scheduleAtFixedRate()
DScheduledExecutorService.java166 long period, in scheduleAtFixedRate() argument
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKPeriod.java249 Period.from(ThaiBuddhistChronology.INSTANCE.period(1, 1, 1)); in factory_from_TemporalAmount_NonISO()
640 pymd(4, 5, 6).plus(ThaiBuddhistChronology.INSTANCE.period(1, 0, 0)); in test_plus_TemporalAmount_nonISO()
785 pymd(4, 5, 6).minus(ThaiBuddhistChronology.INSTANCE.period(1, 0, 0)); in test_minus_TemporalAmount_nonISO()
1060 public void test_addTo(Period period, LocalDate baseDate, LocalDate expected) { in test_addTo() argument
1061 assertEquals(period.addTo(baseDate), expected); in test_addTo()
1065 … public void test_addTo_usingLocalDatePlus(Period period, LocalDate baseDate, LocalDate expected) { in test_addTo_usingLocalDatePlus() argument
1066 assertEquals(baseDate.plus(period), expected); in test_addTo_usingLocalDatePlus()
1113 public void test_subtractFrom(Period period, LocalDate baseDate, LocalDate expected) { in test_subtractFrom() argument
1114 assertEquals(period.subtractFrom(baseDate), expected); in test_subtractFrom()
1118 …public void test_subtractFrom_usingLocalDateMinus(Period period, LocalDate baseDate, LocalDate exp… in test_subtractFrom_usingLocalDateMinus() argument
[all …]
DTCKLocalDate.java1016 MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS);
1017 LocalDate t = TEST_2007_07_15.plus(period);
1023 MockSimplePeriod period = MockSimplePeriod.of(-25, ChronoUnit.DAYS);
1024 LocalDate t = TEST_2007_07_15.plus(period);
1030 MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.HOURS);
1031 TEST_2007_07_15.plus(period);
1041 MockSimplePeriod period = MockSimplePeriod.of(1, ChronoUnit.YEARS);
1042 LocalDate.of(Year.MAX_VALUE, 1, 1).plus(period);
1047 MockSimplePeriod period = MockSimplePeriod.of(-1, ChronoUnit.YEARS);
1048 LocalDate.of(Year.MIN_VALUE, 1, 1).plus(period);
[all …]
DTCKLocalTime.java1422 TemporalAmount period = MockSimplePeriod.of(7, ChronoUnit.HOURS); in test_plus_TemporalAmount_positiveHours() local
1423 LocalTime t = TEST_12_30_40_987654321.plus(period); in test_plus_TemporalAmount_positiveHours()
1429 TemporalAmount period = MockSimplePeriod.of(-25, ChronoUnit.MINUTES); in test_plus_TemporalAmount_negativeMinutes() local
1430 LocalTime t = TEST_12_30_40_987654321.plus(period); in test_plus_TemporalAmount_negativeMinutes()
1436 TemporalAmount period = Period.ZERO; in test_plus_TemporalAmount_zero() local
1437 LocalTime t = TEST_12_30_40_987654321.plus(period); in test_plus_TemporalAmount_zero()
1450 TemporalAmount period = MockSimplePeriod.of(7, ChronoUnit.MONTHS); in test_plus_TemporalAmount_dateNotAllowed() local
1451 TEST_12_30_40_987654321.plus(period); in test_plus_TemporalAmount_dateNotAllowed()
1848 TemporalAmount period = MockSimplePeriod.of(7, ChronoUnit.HOURS);
1849 LocalTime t = TEST_12_30_40_987654321.minus(period);
[all …]
DTCKLocalDateTime.java1375 MockSimplePeriod period = MockSimplePeriod.of(7, MONTHS);
1376 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plus(period);
1382 MockSimplePeriod period = MockSimplePeriod.of(-25, DAYS);
1383 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plus(period);
1389 MockSimplePeriod period = MockSimplePeriod.of(1, YEARS);
1390 LocalDateTime.of(Year.MAX_VALUE, 1, 1, 0, 0).plus(period);
1395 MockSimplePeriod period = MockSimplePeriod.of(-1, YEARS);
1396 LocalDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0).plus(period);
2064 MockSimplePeriod period = MockSimplePeriod.of(7, MONTHS);
2065 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minus(period);
[all …]
/libcore/ojluni/src/main/java/java/time/chrono/
DThaiBuddhistDate.java427 Period period = isoDate.until(endDate); in until() local
428 return getChronology().period(period.getYears(), period.getMonths(), period.getDays()); in until()
DMinguoDate.java427 Period period = isoDate.until(endDate); in until() local
428 return getChronology().period(period.getYears(), period.getMonths(), period.getDays()); in until()
DChronoPeriodImpl.java202 if (!(amount instanceof ChronoPeriodImpl period)) { in validateAmount()
205 if (!(chrono.equals(period.getChronology()))) { in validateAmount()
206 …tion("Chronology mismatch, expected: " + chrono.getId() + ", actual: " + period.getChronology().ge… in validateAmount()
208 return period; in validateAmount()
DJapaneseDate.java668 Period period = isoDate.until(endDate); in until() local
669 return getChronology().period(period.getYears(), period.getMonths(), period.getDays()); in until()
/libcore/ojluni/annotations/hiddenapi/java/util/
DTimerTask.java64 long period = 0; // 0x0 field in TimerTask
/libcore/ojluni/src/main/java/sun/nio/fs/
DPollingWatchService.java282 void enable(Set<? extends WatchEvent.Kind<?>> events, long period) {
290 .scheduleAtFixedRate(thunk, period, period, TimeUnit.SECONDS);
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestUmmAlQuraChronology.java335 …ijrahDate.of(1350, 5, 15), HijrahDate.of(1434, 7, 20), HijrahChronology.INSTANCE.period(84, 2, 5)}, in data_Period()
336 …jrahDate.of(1403, 5, 28), HijrahDate.of(1434, 7, 20), HijrahChronology.INSTANCE.period(31, 1, 22)}, in data_Period()
337 …jrahDate.of(1434, 7, 20), HijrahDate.of(1484, 2, 15), HijrahChronology.INSTANCE.period(49, 6, 24)}, in data_Period()
338 …hDate.of(1500, 6, 12), HijrahDate.of(1450, 4, 21), HijrahChronology.INSTANCE.period(-50, -1, -20)}, in data_Period()
339 …jrahDate.of(1549, 3, 11), HijrahDate.of(1550, 3, 10), HijrahChronology.INSTANCE.period(0, 11, 28)}, in data_Period()
346 ChronoPeriod period = h1.until(h2); in test_until() local
347 assertEquals(period, p); in test_until()
354 ChronoPeriod period = h1.until(m); in test_periodUntilDiffChrono() local
355 assertEquals(period, p); in test_periodUntilDiffChrono()
/libcore/ojluni/annotations/flagged_api/java/util/random/
DRandomGeneratorFactory.annotated.java49 public java.math.BigInteger period() { throw new RuntimeException("Stub!"); } in period() method in RandomGeneratorFactory
/libcore/ojluni/src/test/java/util/Random/
DRandomTestCoverage.java166 BigInteger period = factory.period(); in coverFactory() local

12