diff --git a/ChangeLog b/ChangeLog index d5cb15fc..74dba579 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-11-22 Tatsuhiro Tsujikawa + + Set precision to 2 because share ratio is rounded into 1.0 if precision + set to 1. + * src/ConsoleStatCalc.cc (calculateStat) + 2007-11-20 Tatsuhiro Tsujikawa Preallocate non-requested file which is adjacent forward to requested diff --git a/TODO b/TODO index 74a9a18e..1430eb33 100644 --- a/TODO +++ b/TODO @@ -57,4 +57,3 @@ -- remaining issues to be implemented for 0.12.0 release * Update translation * replace strtol with Util::parseInt -* precision of share ratio diff --git a/src/ConsoleStatCalc.cc b/src/ConsoleStatCalc.cc index c9d88970..a74aaa32 100644 --- a/src/ConsoleStatCalc.cc +++ b/src/ConsoleStatCalc.cc @@ -71,7 +71,7 @@ ConsoleStatCalc::calculateStat(const RequestGroupManHandle& requestGroupMan, if(firstRequestGroup->downloadFinished() && !BtContextHandle(firstRequestGroup->getDownloadContext()).isNull()) { cout << "SEEDING" << "(" << "ratio:" - << fixed << setprecision(1) << stat.getAllTimeUploadLength()*1.0/firstRequestGroup->getCompletedLength() + << fixed << setprecision(2) << stat.getAllTimeUploadLength()*1.0/firstRequestGroup->getCompletedLength() << ")"; } else #endif // ENABLE_BITTORRENT