[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
Sun Nov 1 21:34:51 UTC 2015
axel-Bugs item #312669 was changed at 2015-11-01 21:34 by Joao Eriberto Mota Filho
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 ;-)
----------------------------------------------------------------------
Comment By: Joao Eriberto Mota Filho (eriberto)
Date: 2015-11-01 21:34
Message:
Fixed in 2.5 version.
New repository at https://github.com/eribertomota/axel
----------------------------------------------------------------------
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