What version of FLTK are you using?

On Mar 8, 2010, at 9:46 PM, leowang wrote:

> I have add a timeout in my main thread, and it will repeat per 1 second, then 
> I change the RTC time, change to a previous time, such as (the current time 
> is 9th Mar, 2010, I change to 9th Mar, 2009), the timeout will stop and will 
> not repeat. But if I change the time to a future time, will has no such 
> issue. Why?

I do not know the exact answer, but I can probably tell you why having 
implemented my own Timer classes in the past. When you create a 1 second 
repeating timer, usually the underlying logic will just set an expire time of 
"now + 1 sec." If you move the clock backwards (by a year for example) that 
expire time is now way into the future.

> I tried to remove the timeout, and add the timeout again after change to 
> prvious time, sometimes the timeout can repeat again and again, but sometimes 
> can't work.

Are you using Fl_Timer or the Fl::add_timeout() methods directly?

Harvey

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to