Skip to main content

Timer Facility behaviour

2 replies [Last post]
Joined: 2007-04-02

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.
Joined: 2006-01-09

Does java.util.Timer handle case like this?

Joined: 2007-04-02

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