Changeset 7037


Ignore:
Timestamp:
Nov 4, 2008, 1:18:05 PM (12 years ago)
Author:
livings124
Message:

seeding eta better matches libT's calculation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r7018 r7037  
    942942        return TR_ETA_UNKNOWN;
    943943   
    944     return (CGFloat)MAX([self downloadedTotal], [self haveTotal]) * (stopRatio - ratio) / uploadRate / 1024.0;
     944    CGFloat haveDownloaded = (CGFloat)([self downloadedTotal] > 0 ? [self downloadedTotal] : [self haveVerified]);
     945    CGFloat needUploaded = haveDownloaded * (stopRatio - ratio);
     946    return needUploaded / uploadRate / 1024.0;
    945947}
    946948
Note: See TracChangeset for help on using the changeset viewer.