timer in libinn

Kiernan, Alex alexk at demon.net
Tue Feb 6 21:45:21 UTC 2001



> Alex Kiernan <alexk at demon.net> writes:
> 
> > Code to move timers into libinn, this seems to be doing the 
> right thing;
> > lib/timer.c and include/timer.h should be attached. This 
> should cover
> > both innfeed & innd. Still needs some docs writing, I'll get to that
> > today, with luck.
> 
> Do we still need these configure changes?  It doesn't look 
> like your patch
> actually uses them, and I think gettimeofday should be as fast as
> gethrtime and probably more portable.
> 

Don't think they are, you're right.

> Using alloca isn't a bad idea, but it requires that we have a fallback
> available for those platforms that don't have it, which 
> requires that we
> call alloca(0) periodically and which would mean some infrastructure
> work.
> 

Two options spring to mind, either call alloca(0) in TMRsummary, or a
malloc/free - an alloca(0) probably then degenerates to a malloc/free & may
as well do that in there.

-- 
Alex Kiernan, Principal Engineer, Development, Thus PLC 


More information about the inn-patches mailing list