[concurrency-interest] Scheduling tasks using TimerTask

John D. Mitchell jdmitchell at gmail.com
Sat Nov 6 23:10:41 EDT 2010

On Nov 6, 2010, at 17:39 , George wrote:
> Thanks very much for the suggestion, it is very informative,
> I have tried scheduling the task few seconds before the actual  
> deadline and
> rescheduling it again for the target time with the recalculated time  
> in
> milli seconds. However, this approach doesn't work with frequent ntp
> synchronization. It may be that the initial scheduling might have
> accumulated error and the second rescheduling only occurs after the  
> target
> time has lapsed

You might want to switch from using ntp to clockspeed, http://cr.yp.to/clockspeed.html 
.  Clockspeed's approach is much smoother than the random seeming  
changes due to ntp.

Have fun,

More information about the Concurrency-interest mailing list