On Fri, Oct 07, 2005 at 07:07:52PM -0400, Robert Story wrote:
> On Sat, 1 Oct 2005 10:29:08 +0200 Magnus wrote:
> MF> 
> MF> Under your scheme the adjustment to be applied to each alarm is (TC-Ta)
> MF> but the adjustment should be (TB-Tb).
> 
> No, my adjustment would be (TC + (Ts - Ta), where Ts is the time the event was
> scheduled to run,

I think we are violently agreeing here. The adjusted scheduled time to run, TS,
would be

TS = (TC + (Ts - Ta)) == Ts + (TC - Ta)

so the adjustment is (TC - Ta) :-)

> Actually, depending on the OS, we might be able to do better. According to the
> man page, select may update the passed time val with the time remaining had an
> event not woken up the process. We could use that to offset all the timeouts.

Yes, the famous Linux exception, that would help as well, except for the
detail that the timeout argument is unavailable in run_alarms.
It would also mean that we forces the user to use select, not pselect, poll,
epoll or anything else, and since this is a public interface in the library I
think that would be bad.

> But we'd have to make sure the everywhere in the code base is updated to track
> this.

/MF


-------------------------------------------------------
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
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to