On Fri, 30 Sep 2005 08:55:44 +0200 Magnus wrote:
MF> 2) It handles only one outstanding timeout, if there are two in the queue
MF> that should happen in the next minute and you set back the clock an hour
MF> your patch will run the first one and the second one will be delayed.
MF> 
MF>    Now, to run every timeout is also wrong, what is needed is a way to tell
MF>    how big the time warp was and then adjust timeouts that should wait for
MF>    N time units but leave those that should run at a certain time alone.

I don't think the code know the difference between a time that wants to run a
3:37 and one that wants to run in 53 seconds. Without adding a flag, there is
nothing we can do about that.

My suggestion: when the current time is < last run, loop through the alarms
and calculate the diff between last run and next run for each. Then set each
one to run at (now + diff). Effectively, each alarm will be run after the
amount of time it was expecting to wait has passed.

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
      unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to