Show download rate in fixed notation

This commit is contained in:
Tatsuhiro Tsujikawa 2007-06-10 08:40:01 +00:00
parent 649830316e
commit 1b35f2f8c8

View File

@ -35,6 +35,7 @@
#include "ConsoleDownloadEngine.h" #include "ConsoleDownloadEngine.h"
#include "Util.h" #include "Util.h"
#include <signal.h> #include <signal.h>
#include <iomanip>
volatile sig_atomic_t haltRequested = 0; volatile sig_atomic_t haltRequested = 0;
@ -79,7 +80,7 @@ void ConsoleDownloadEngine::sendStatistics(long long int currentSize, long long
} }
cout << "]"; cout << "]";
} }
cout << "[" << speed/1024.0 << "KB/s" << "]"; cout << "[" << fixed << setprecision(2) << speed/1024.0 << "KB/s" << "]";
{ {
FileAllocationEntryHandle entry = _fileAllocationMan->getCurrentFileAllocationEntry(); FileAllocationEntryHandle entry = _fileAllocationMan->getCurrentFileAllocationEntry();