[quagga-users 5679] Re: ospf timer display format

Andrew J. Schorr aschorr at telemetry-investments.com
Thu Oct 20 10:32:28 IST 2005


On Thu, Oct 20, 2005 at 02:56:18AM +0100, Paul Jakma wrote:
> ospfd uses 'ospf_timer_dump' in a few places (most notably 'show ip 
> ospf neigbour') to print out a relative time in the format:
> 
> 	HH:MM:SS
> 
> Which is, usually, a waste of space given most OSPF timers are 
> sub-minute. I'd like to change it to:
> 
> a) print a unit in place of the :, eg HHhMMmSSs
> 
> b) not print leading 0s.
> 
> So the "00:00:31" type time we're all used to turns into "31s".
> 
> I'd like to do this because I also want to extend it to include the 
> millisec portion - which becomes relevant with fast hellos (so, to be 
> honest, above would turn into "31.123s" really).

That makes sense to me.  From an implementation standpoint, it
seems a bit surprising that there's no lib/thread.c API for
extracting info about time remaining (i.e. it seems a bit strange
that ospf_timer_dump has to access the struct thread fields
directly). 

Regards,
Andy


More information about the Quagga-users mailing list