ActivityMonitor: use string_for_rate

* Network speed was previously always shown as Kb/s, now it can switch
to Mb/s when needed.
* Fixes #11053.

Signed-off-by: Adrien Destugues <[email protected]>
This commit is contained in:
kushalsingh007
2015-01-11 12:47:14 +01:00
committed by Adrien Destugues
parent 2098842047
commit a15d13d9bb
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -12,6 +12,7 @@
#include <Catalog.h>
#include <OS.h>
#include <String.h>
#include <StringForRate.h>
#include "SystemInfo.h"
@@ -1225,7 +1226,7 @@ void
NetworkUsageDataSource::Print(BString& text, int64 value) const
{
char buffer[32];
snprintf(buffer, sizeof(buffer), B_TRANSLATE("%.1f KiB/s"), value / 1024.0);
string_for_rate(value, buffer, sizeof(buffer));
text = buffer;
}