什么是差异b/w scheduleAtFixedRate和日程安排:

Ram*_*esh 5 java-me

这在j2me中效率更高:

public void schedule(TimerTask任务,Date firstTime,long period)

public void scheduleAtFixedRate(TimerTask任务,长延迟,长时间段)

我所理解的是scheduleAtFixedRate用于长延迟和短暂延迟的时间表.

scheduleAtFixedRate将不会看到之前的任务是否完成,它将在固定时间启动下一个任务.

任何更多的差异... PLZ帮助.

sco*_*t95 3

据我了解,两者之间的唯一区别是在几毫秒后schedule运行。完成后,它将等待几毫秒,然后再次运行。另一方面会做同样的事情,但它会运行,等待毫秒,然后再次运行,无论第一个是否完成。taskdelaytaskperiodtaskscheduleAtFixedRatetaskperiodtasktask