Skip to main content

Timer Facility behaviour

2 replies [Last post]
mlaporta
Offline
Joined: 2007-04-02
Points: 0

Which is the behaviour of Timer Facility when I change system time?
It seems that when time goes back/forward the task is not executed correctly.
Here my code:

// cdr timeout in seconds
long cdrTimeout = 120;

// create timer options
TimerOptions timerOpts = new TimerOptions(true,cdrTimeout*1000,TimerPreserveMissed.ALL);

long currentTime = System.currentTimeMillis();
long expireTime = currentTime + (cdrTimeout*1000);

TimerID tid = timerFacility.setTimer(cdrACI, null, expireTime, cdrTimeout*1000 ,Integer.MAX_VALUE,timerOpts);

This could be a problem when machine changes from summer legal time to legal hour.
Any advice/tips

thanks Michele

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
baranowb
Offline
Joined: 2006-01-09
Points: 0

Does java.util.Timer handle case like this?

mlaporta
Offline
Joined: 2007-04-02
Points: 0

I don't think so.Further investigation brings to this (still in progress):

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4290274