Searched refs:period (Results 1 - 25 of 27) sorted by relevance

12

/libcore/ojluni/src/main/java/java/util/
H A DTimerTask.java81 long period = 0; field in class:TimerTask
154 return (period < 0 ? nextExecutionTime + period
155 : nextExecutionTime - period);
H A DTimer.java214 * at approximately regular intervals separated by the specified period.
221 * lower than the reciprocal of the specified period (assuming the system
235 * @param period time in milliseconds between successive task executions.
238 * {@code period <= 0}
243 public void schedule(TimerTask task, long delay, long period) { argument
246 if (period <= 0)
247 throw new IllegalArgumentException("Non-positive period.");
248 sched(task, System.currentTimeMillis()+delay, -period);
254 * approximately regular intervals, separated by the specified period.
261 * lower than the reciprocal of the specified period (assumin
284 schedule(TimerTask task, Date firstTime, long period) argument
323 scheduleAtFixedRate(TimerTask task, long delay, long period) argument
366 scheduleAtFixedRate(TimerTask task, Date firstTime, long period) argument
386 sched(TimerTask task, long time, long period) argument
[all...]
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
H A DTCKChronoPeriod.java106 ChronoPeriod period = chrono.period(1, 2, 3);
109 out.writeObject(period);
115 assertEquals(ser, period, "deserialized ChronoPeriod is wrong");
120 ChronoPeriod period = chrono.period(1, 2, 3);
121 assertEquals(period.get(YEARS), 1);
122 assertEquals(period.get(MONTHS), 2);
123 assertEquals(period.get(DAYS), 3);
128 ChronoPeriod period
[all...]
H A DTCKMinguoChronology.java500 ChronoPeriod period = mdate1.until(mdate2);
501 assertEquals(period, MinguoChronology.INSTANCE.period(1, 1, 1));
517 ChronoPeriod period = mdate1.until(ldate2);
518 assertEquals(period, MinguoChronology.INSTANCE.period(1, 1, 1));
H A DTCKThaiBuddhistChronology.java461 ChronoPeriod period = mdate1.until(mdate2);
462 assertEquals(period, ThaiBuddhistChronology.INSTANCE.period(1, 1, 1));
478 ChronoPeriod period = mdate1.until(ldate2);
479 assertEquals(period, ThaiBuddhistChronology.INSTANCE.period(1, 1, 1));
H A DTCKJapaneseChronology.java619 ChronoPeriod period = mdate1.until(mdate2);
620 assertEquals(period, JapaneseChronology.INSTANCE.period(1, 1, 1));
636 ChronoPeriod period = mdate1.until(ldate2);
637 assertEquals(period, JapaneseChronology.INSTANCE.period(1, 1, 1));
/libcore/ojluni/src/main/java/java/util/concurrent/
H A DScheduledExecutorService.java132 * period; that is, executions will commence after
133 * {@code initialDelay}, then {@code initialDelay + period}, then
134 * {@code initialDelay + 2 * period}, and so on.
150 * <p>If any execution of this task takes longer than its period, then
156 * @param period the period between successive executions
157 * @param unit the time unit of the initialDelay and period parameters
166 * @throws IllegalArgumentException if period less than or equal to zero
170 long period,
168 scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) argument
H A DScheduledThreadPoolExecutor.java196 private final long period; field in class:ScheduledThreadPoolExecutor.ScheduledFutureTask
213 this.period = 0;
219 * trigger time and period.
222 long period, long sequenceNumber) {
225 this.period = period;
236 this.period = 0;
269 return period != 0;
276 long p = period;
590 long period,
221 ScheduledFutureTask(Runnable r, V result, long triggerTime, long period, long sequenceNumber) argument
588 scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) argument
[all...]
H A DExecutors.java686 public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) { argument
687 return e.scheduleAtFixedRate(command, initialDelay, period, unit);
/libcore/ojluni/src/main/java/java/sql/
H A DTimestamp.java187 int period = 0;
214 period = time_s.indexOf('.', secondColon+1);
244 if ((period > 0) & (period < time_s.length()-1)) {
246 Integer.parseInt(time_s.substring(secondColon+1, period));
247 nanos_s = time_s.substring(period+1);
254 } else if (period > 0) {
/libcore/ojluni/src/main/java/java/time/chrono/
H A DMinguoDate.java427 Period period = isoDate.until(endDate);
428 return getChronology().period(period.getYears(), period.getMonths(), period.getDays());
H A DThaiBuddhistDate.java427 Period period = isoDate.until(endDate);
428 return getChronology().period(period.getYears(), period.getMonths(), period.getDays());
H A DChronoPeriodImpl.java86 * A period expressed in terms of a standard year-month-day calendar system.
199 * @return the period, not null
206 ChronoPeriodImpl period = (ChronoPeriodImpl) amount;
207 if (chrono.equals(period.getChronology()) == false) {
208 throw new ClassCastException("Chronology mismatch, expected: " + chrono.getId() + ", actual: " + period.getChronology().getId());
210 return period;
H A DJapaneseDate.java668 Period period = isoDate.until(endDate);
669 return getChronology().period(period.getYears(), period.getMonths(), period.getDays());
H A DChronology.java678 * Obtains a period for this chronology based on years, months and days.
680 * This returns a period tied to this chronology using the specified
683 * allows the period to be represented using other units.
697 * The returned period is immutable and thread-safe.
702 * @return the period in terms of this chronology, not null
704 default ChronoPeriod period(int years, int months, int days) { method in interface:Chronology
H A DIsoChronology.java571 * Obtains a period for this chronology based on years, months and days.
573 * This returns a period tied to the ISO chronology using the specified
579 * @return the period in terms of this chronology, not null
580 * @return the ISO period, not null
583 public Period period(int years, int months, int days) { method in class:IsoChronology
H A DHijrahDate.java96 * Gregorian calendar, and the length of each month is based on the period
602 return getChronology().period(Math.toIntExact(years), months, days);
/libcore/ojluni/src/test/java/time/tck/java/time/
H A DTCKPeriod.java249 Period.from(ThaiBuddhistChronology.INSTANCE.period(1, 1, 1));
640 pymd(4, 5, 6).plus(ThaiBuddhistChronology.INSTANCE.period(1, 0, 0));
785 pymd(4, 5, 6).minus(ThaiBuddhistChronology.INSTANCE.period(1, 0, 0));
1060 public void test_addTo(Period period, LocalDate baseDate, LocalDate expected) { argument
1061 assertEquals(period.addTo(baseDate), expected);
1065 public void test_addTo_usingLocalDatePlus(Period period, LocalDate baseDate, LocalDate expected) { argument
1066 assertEquals(baseDate.plus(period), expected);
1113 public void test_subtractFrom(Period period, LocalDate baseDate, LocalDate expected) { argument
1114 assertEquals(period.subtractFrom(baseDate), expected);
1118 public void test_subtractFrom_usingLocalDateMinus(Period period, LocalDat argument
[all...]
H A 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...]
H A DTCKLocalTime.java1394 TemporalAmount period = MockSimplePeriod.of(7, ChronoUnit.HOURS);
1395 LocalTime t = TEST_12_30_40_987654321.plus(period);
1401 TemporalAmount period = MockSimplePeriod.of(-25, ChronoUnit.MINUTES);
1402 LocalTime t = TEST_12_30_40_987654321.plus(period);
1408 TemporalAmount period = Period.ZERO;
1409 LocalTime t = TEST_12_30_40_987654321.plus(period);
1422 TemporalAmount period = MockSimplePeriod.of(7, ChronoUnit.MONTHS);
1423 TEST_12_30_40_987654321.plus(period);
1820 TemporalAmount period = MockSimplePeriod.of(7, ChronoUnit.HOURS);
1821 LocalTime t = TEST_12_30_40_987654321.minus(period);
[all...]
H A 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...]
H A DTCKOffsetTime.java888 MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MINUTES);
889 OffsetTime t = TEST_11_30_59_500_PONE.plus(period);
983 MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MINUTES);
984 OffsetTime t = TEST_11_30_59_500_PONE.minus(period);
H A DTCKOffsetDateTime.java926 MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS);
927 OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.plus(period);
1037 MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS);
1038 OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.minus(period);
/libcore/ojluni/src/main/java/sun/nio/fs/
H A DPollingWatchService.java282 void enable(Set<? extends WatchEvent.Kind<?>> events, long period) { argument
290 .scheduleAtFixedRate(thunk, period, period, TimeUnit.SECONDS);
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
H A DTestUmmAlQuraChronology.java330 // Data provider to get the difference between two dates as a period
334 {HijrahDate.of(1350, 5, 15), HijrahDate.of(1434, 7, 20), HijrahChronology.INSTANCE.period(84, 2, 5)},
335 {HijrahDate.of(1403, 5, 28), HijrahDate.of(1434, 7, 20), HijrahChronology.INSTANCE.period(31, 1, 22)},
336 {HijrahDate.of(1434, 7, 20), HijrahDate.of(1484, 2, 15), HijrahChronology.INSTANCE.period(49, 6, 24)},
337 {HijrahDate.of(1500, 6, 12), HijrahDate.of(1450, 4, 21), HijrahChronology.INSTANCE.period(-50, -1, -20)},
338 {HijrahDate.of(1549, 3, 11), HijrahDate.of(1550, 3, 10), HijrahChronology.INSTANCE.period(0, 11, 28)},
345 ChronoPeriod period = h1.until(h2);
346 assertEquals(period, p);
353 ChronoPeriod period = h1.until(m);
354 assertEquals(period,
[all...]

Completed in 384 milliseconds

12