mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Added some more debug
This commit is contained in:
parent
862d24ac48
commit
e1ead940be
1 changed files with 3 additions and 2 deletions
|
@ -157,12 +157,13 @@ void bittorrent::updateETAs() {
|
||||||
if(h.download_payload_rate()) {
|
if(h.download_payload_rate()) {
|
||||||
listEtas << (qlonglong)((h.actual_size()-h.total_done())/(double)h.download_payload_rate());
|
listEtas << (qlonglong)((h.actual_size()-h.total_done())/(double)h.download_payload_rate());
|
||||||
ETAstats[hash] = listEtas;
|
ETAstats[hash] = listEtas;
|
||||||
long moy = 0;
|
qlonglong moy = 0;
|
||||||
long val;
|
qlonglong val;
|
||||||
unsigned int nbETAs = listEtas.size();
|
unsigned int nbETAs = listEtas.size();
|
||||||
Q_ASSERT(nbETAs);
|
Q_ASSERT(nbETAs);
|
||||||
foreach(val, listEtas) {
|
foreach(val, listEtas) {
|
||||||
moy += (qlonglong)((double)val/(double)nbETAs);
|
moy += (qlonglong)((double)val/(double)nbETAs);
|
||||||
|
qDebug("ETA: %ld, nbETAs: %d, moy: %ld", (long)val, nbETAs, (long)moy);
|
||||||
Q_ASSERT(moy >= 0);
|
Q_ASSERT(moy >= 0);
|
||||||
}
|
}
|
||||||
ETAs[hash] = moy;
|
ETAs[hash] = moy;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue