2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Set precision to 2 because share ratio is rounded into 1.0 if 
precision
	set to 1.
	* src/ConsoleStatCalc.cc (calculateStat)
pull/1/head
Tatsuhiro Tsujikawa 2007-11-21 16:23:17 +00:00
parent c9e3d51054
commit 1fed0c0cb0
3 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
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 <tujikawa at rednoah dot com>
Preallocate non-requested file which is adjacent forward to requested

1
TODO
View File

@ -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

View File

@ -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