[PATCH] new applet: nmeter
Rich Felker
dalias at aerifal.cx
Wed Jul 5 14:04:05 PDT 2006
On Wed, Jul 05, 2006 at 09:58:53PM +0200, Denis Vlasenko wrote:
> > > Size of the applet (make objsizes):
> > >
> > > text+data text+rodata rwdata bss filename
> > > 5090 4954 136 4104 miscutils/nmeter.o
> > >
> > > Run tested.
> >
> > looks rather large relative to what it does.
>
> Biggest functions are:
>
> +00000040 t simple_itoa
Duplicates code from sprintf... Can be removed or made into sprintf
wrapper, perhaps.
> > also imo the code would be smaller using strftime for printing
> > times instead of inlining the hh:mm:ss string generation, etc. since
> > strftime is already used in bb anyway.
>
> Do you want strftime to parse "%H:%M:%S" format string _on each call_?
> Will strftime round to nearest last displayed digit in fractional second?
> Can it do fractional seconds at all, let alone with user specified
> resolution (number of digits after the dot)?
No, it just does struct tm which has no fractional seconds. I didn't
read the code very closely to see what was needed; I just saw some
repeated code to generate time strings.
Rich
More information about the busybox
mailing list