Home
last modified time | relevance | path

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

12

/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKChronoPeriod.java106 ChronoPeriod period = chrono.period(1, 2, 3); in test_serialization() local
109 out.writeObject(period); in test_serialization()
115 assertEquals(ser, period, "deserialized ChronoPeriod is wrong"); in test_serialization()
120 ChronoPeriod period = chrono.period(1, 2, 3); in test_get() local
121 assertEquals(period.get(YEARS), 1); in test_get()
122 assertEquals(period.get(MONTHS), 2); in test_get()
123 assertEquals(period.get(DAYS), 3); in test_get()
128 ChronoPeriod period = chrono.period(1, 2, 3); in test_get_unsupported() local
129 period.get(HOURS); in test_get_unsupported()
134 ChronoPeriod period = chrono.period(1, 2, 3); in test_getUnits() local
[all …]
DTCKThaiBuddhistChronology.java461 ChronoPeriod period = mdate1.until(mdate2); in test_periodUntilDate() local
462 assertEquals(period, ThaiBuddhistChronology.INSTANCE.period(1, 1, 1)); in test_periodUntilDate()
478 ChronoPeriod period = mdate1.until(ldate2); in test_periodUntilDiffChrono() local
479 assertEquals(period, ThaiBuddhistChronology.INSTANCE.period(1, 1, 1)); in test_periodUntilDiffChrono()
DTCKMinguoChronology.java500 ChronoPeriod period = mdate1.until(mdate2); in test_periodUntilDate() local
501 assertEquals(period, MinguoChronology.INSTANCE.period(1, 1, 1)); in test_periodUntilDate()
517 ChronoPeriod period = mdate1.until(ldate2); in test_periodUntilDiffChrono() local
518 assertEquals(period, MinguoChronology.INSTANCE.period(1, 1, 1)); in test_periodUntilDiffChrono()
/libcore/ojluni/src/main/java/java/util/
DTimer.java250 public void schedule(TimerTask task, long delay, long period) { in schedule() argument
253 if (period <= 0) in schedule()
255 sched(task, System.currentTimeMillis()+delay, -period); in schedule()
291 public void schedule(TimerTask task, Date firstTime, long period) { in schedule() argument
292 if (period <= 0) in schedule()
294 sched(task, firstTime.getTime(), -period); in schedule()
330 public void scheduleAtFixedRate(TimerTask task, long delay, long period) { in scheduleAtFixedRate() argument
333 if (period <= 0) in scheduleAtFixedRate()
335 sched(task, System.currentTimeMillis()+delay, period); in scheduleAtFixedRate()
374 long period) { in scheduleAtFixedRate() argument
[all …]
DTimerTask.java81 long period = 0; field in TimerTask
154 return (period < 0 ? nextExecutionTime + period in scheduledExecutionTime()
155 : 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()
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/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.java196 private final long period; field in ScheduledThreadPoolExecutor.ScheduledFutureTask
213 this.period = 0; in ScheduledFutureTask()
222 long period, long sequenceNumber) { in ScheduledFutureTask() argument
225 this.period = period; in ScheduledFutureTask()
236 this.period = 0; in ScheduledFutureTask()
269 return period != 0; in isPeriodic()
276 long p = period; in setNextRunTime()
590 long period, in scheduleAtFixedRate() argument
594 if (period <= 0L) in scheduleAtFixedRate()
600 unit.toNanos(period), in scheduleAtFixedRate()
DScheduledExecutorService.java170 long period, in scheduleAtFixedRate() argument
DExecutors.java696 …ledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) {
697 return e.scheduleAtFixedRate(command, initialDelay, period, unit);
/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.java206 ChronoPeriodImpl period = (ChronoPeriodImpl) amount; in validateAmount() local
207 if (chrono.equals(period.getChronology()) == false) { in validateAmount()
208 …tion("Chronology mismatch, expected: " + chrono.getId() + ", actual: " + period.getChronology().ge… in validateAmount()
210 return period; in validateAmount()
DJapaneseDate.java672 Period period = isoDate.until(endDate); in until() local
673 return getChronology().period(period.getYears(), period.getMonths(), period.getDays()); in until()
DChronology.java704 default ChronoPeriod period(int years, int months, int days) { in period() method
/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.java971 MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS);
972 LocalDate t = TEST_2007_07_15.plus(period);
978 MockSimplePeriod period = MockSimplePeriod.of(-25, ChronoUnit.DAYS);
979 LocalDate t = TEST_2007_07_15.plus(period);
985 MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.HOURS);
986 TEST_2007_07_15.plus(period);
996 MockSimplePeriod period = MockSimplePeriod.of(1, ChronoUnit.YEARS);
997 LocalDate.of(Year.MAX_VALUE, 1, 1).plus(period);
1002 MockSimplePeriod period = MockSimplePeriod.of(-1, ChronoUnit.YEARS);
1003 LocalDate.of(Year.MIN_VALUE, 1, 1).plus(period);
[all …]
DTCKLocalTime.java1428 TemporalAmount period = MockSimplePeriod.of(7, ChronoUnit.HOURS); in test_plus_TemporalAmount_positiveHours() local
1429 LocalTime t = TEST_12_30_40_987654321.plus(period); in test_plus_TemporalAmount_positiveHours()
1435 TemporalAmount period = MockSimplePeriod.of(-25, ChronoUnit.MINUTES); in test_plus_TemporalAmount_negativeMinutes() local
1436 LocalTime t = TEST_12_30_40_987654321.plus(period); in test_plus_TemporalAmount_negativeMinutes()
1442 TemporalAmount period = Period.ZERO; in test_plus_TemporalAmount_zero() local
1443 LocalTime t = TEST_12_30_40_987654321.plus(period); in test_plus_TemporalAmount_zero()
1456 TemporalAmount period = MockSimplePeriod.of(7, ChronoUnit.MONTHS); in test_plus_TemporalAmount_dateNotAllowed() local
1457 TEST_12_30_40_987654321.plus(period); in test_plus_TemporalAmount_dateNotAllowed()
1854 TemporalAmount period = MockSimplePeriod.of(7, ChronoUnit.HOURS);
1855 LocalTime t = TEST_12_30_40_987654321.minus(period);
[all …]
DTCKLocalDateTime.java1381 MockSimplePeriod period = MockSimplePeriod.of(7, MONTHS);
1382 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plus(period);
1388 MockSimplePeriod period = MockSimplePeriod.of(-25, DAYS);
1389 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plus(period);
1395 MockSimplePeriod period = MockSimplePeriod.of(1, YEARS);
1396 LocalDateTime.of(Year.MAX_VALUE, 1, 1, 0, 0).plus(period);
1401 MockSimplePeriod period = MockSimplePeriod.of(-1, YEARS);
1402 LocalDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0).plus(period);
2070 MockSimplePeriod period = MockSimplePeriod.of(7, MONTHS);
2071 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minus(period);
[all …]
/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()

12