开发者

What is diff b/w scheduleAtFixedRate and schedule:

which is more efficient in j2me:

public void schedule(TimerTask task, Date firstTime, long period)

public void scheduleAtFixedRate(TimerTask task, long delay, long period)

what i understand is scheduleA开发者_如何转开发tFixedRate used for long delay and schedule for short delay.

scheduleAtFixedRate will not see that previous task completed or not , it will start next task at fixed time.

any more diff... plz help.


It is my understanding that the only difference between the two is that schedule will run task after delay milliseconds. After task completes it will wait period milliseconds before running task again. scheduleAtFixedRate on the other hand will do the same, but it will run task, wait period millisecond, and run task again, regardless of whether or not the first task finished.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜