increase of the "resolution" of the speed info in the MB range

SVN revision: 29179
This commit is contained in:
Viktor Kojouharov 2007-03-26 17:06:32 +00:00
parent 69b39c9a3c
commit f7b8e096e5
1 changed files with 2 additions and 2 deletions

View File

@ -335,9 +335,9 @@ static void
_bytes_to_string(bytes_t bytes, char *string, int size)
{
if (bytes > 1048576)
snprintf(string, size, "%lu Mb", (bytes / 1048576));
snprintf(string, size, "%.2f MB", ((float) bytes / 1048576));
else if ((bytes > 1024) && (bytes < 1048576))
snprintf(string, size, "%lu Kb", (bytes / 1024));
snprintf(string, size, "%lu KB", (bytes / 1024));
else
snprintf(string, size, "%lu B", bytes);
}