[axel-devel] [axel-Bugs][312669] Axel download summary displays incorrect unit of time

axel-bugs at alioth.debian.org axel-bugs at alioth.debian.org
Thu Aug 19 21:50:55 UTC 2010


Bugs item #312669, was opened at 2010-08-19 21:50
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413085&aid=312669&group_id=100070

Status: Open
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: Axel download summary displays incorrect unit of time 


Initial Comment:
The download summary of axel version 2.4 displays an incorrect unit of time, IMHO. For example, axel displays this summary for a download taking longer than a minute:

Downloaded 23.4 megabytes in 1:09 seconds. (344.00 KB/s)


I think that this should then look like:

Downloaded 23.4 megabytes in 1:09 minutes. (344.00 KB/s)


Please find below a modified version of the function time_human of source file text.c which solves this "problem":


/* Convert a number of seconds to a human-readable form     */
char *time_human( int value )
{
  if( value == 1 )
    sprintf( string, _("%i second"), value );
  else if( value < 60 )
    sprintf( string, _("%i seconds"), value );
  else if( value < 3600 )
    sprintf( string, _("%i:%02i minute(s)"), value / 60, value % 60 );
  else
    sprintf( string, _("%i:%02i:%02i hour(s)"), value / 3600, ( value / 60 ) % 60, value % 60 );

  return( string );
}

Please feel free to contact me, if you don't agree with this change request ;-)

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413085&aid=312669&group_id=100070



More information about the axel-devel mailing list