increase of the "resolution" of the speed info in the MB range
SVN revision: 29179
This commit is contained in:
parent
69b39c9a3c
commit
f7b8e096e5
|
@ -335,9 +335,9 @@ static void
|
||||||
_bytes_to_string(bytes_t bytes, char *string, int size)
|
_bytes_to_string(bytes_t bytes, char *string, int size)
|
||||||
{
|
{
|
||||||
if (bytes > 1048576)
|
if (bytes > 1048576)
|
||||||
snprintf(string, size, "%lu Mb", (bytes / 1048576));
|
snprintf(string, size, "%.2f MB", ((float) bytes / 1048576));
|
||||||
else if ((bytes > 1024) && (bytes < 1048576))
|
else if ((bytes > 1024) && (bytes < 1048576))
|
||||||
snprintf(string, size, "%lu Kb", (bytes / 1024));
|
snprintf(string, size, "%lu KB", (bytes / 1024));
|
||||||
else
|
else
|
||||||
snprintf(string, size, "%lu B", bytes);
|
snprintf(string, size, "%lu B", bytes);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue