0
나는 아마 바보가된다. 긴 하루 였어!Quartz에서 getNextIncludedTime()을 이해할 수 없다.
DateTime dt = new DateTime();
dt = dt.withDayOfMonth(20);
Calendar cal = new CronCalendar("0 0/10 * * * ?");
long start = dt.getMillis();
System.out.println("Starting at " + start);
long end = start + 10;
long current = start;
int i = 0;
while (current < end) {
if (i > 0) {
System.out.println(i + ":" + current);
}
long next = cal.getNextIncludedTime(current);
current = next;
i++;
}
나는 대부분의 사람이 출력 시간을 포함에 시간 창은 10ms의 한,있을 것으로 기대 : 나는
이 코드를 감안할 때 ... 석영에 첫 입성에 뭔가를 오해 한 캘린더에 포함 된 시간은 10 분입니다.
하지만 그것을 실행하면
Starting at 1250796103004
1:1250796103005
2:1250796103006
3:1250796103007
4:1250796103008
5:1250796103009
6:1250796103010
7:1250796103011
8:1250796103012
9:1250796103013
도와주세요!