Timer library

Fabien Tassin fta at sofaraway.org
Sat Feb 3 10:13:19 UTC 2001


According to Russ Allbery:
> 
> Alex Kiernan <alexk at demon.net> writes:
> 
> > I've got most of the history code hauled out into a separate library
> > (still got expire to do), but I'm trying to figure the best approach to
> > dealing with the timers in it.
> 
> > I'm inclined to move timer.c into libinn & merge the timers from
> > innfeed, so that there's one place where timers happen, and you just get
> > some of them permanently zero in an application when you're not using
> > those bits.
> 
> > Thoughts?
> 
> Please!  I was going to do this myself, but I'll be quite happy to have
> you beat me to it.
> 
> One approach to consider that I was thinking about doing:  Have the
> library only track timers by number and then have the calling application
> pass in an array of number to name mappings for the periodic logging.
> That way you can put the enum and the number to string array in the client
> and the timer code can be completely generic and won't have to be modified
> every time we add timing to another program and want more timer types.

I'm also looking for ideas for a threadable timer measuring all the
threads at once. I now have a working prototype of INNT that is currently
only able to eat BW and to log various stats for all incoming channels to
syslog and to generate a status file.
I'm now working on history and I need a timer to see if I'm not figthing
in vain with my threads and mutexes..

-- 
Fabien Tassin -+- fta at sofaraway.org


More information about the inn-workers mailing list