One place that needs to be updated too is probably the sysuptime. 

-----Original Message-----
From: Magnus Fromreide [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 07, 2005 10:49 PM
To: net-snmp-coders@lists.sourceforge.net
Cc: Juan Betty-MGIA2720
Subject: Re: Patch for delaying of tasks attached to snmp_alarm_register

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 
> MF> (TC-Ta) 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