~ubuntu-branches/ubuntu/lucid/ktorrent/lucid

« back to all changes in this revision

Viewing changes to libbtcore/torrent/timeestimator.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2009-02-16 18:37:14 UTC
  • mfrom: (1.1.25 upstream) (0.4.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090216183714-52tf47jrnmk4xkmp
Tags: 3.2+dfsg.1-2ubuntu1
* Merge with Debian, remaining changes: (LP: #296433)
  - Use Kubuntu's kde4.mk
  - Build-depend on libboost-serialization1.35-dev since unversioned -dev is
    in universe
  - Change plasma-applet-ktorrent to plasma-widget-ktorrent since we're
    supposed to call them widgets for the users

Show diffs side-by-side

added added

removed removed

Lines of Context:
144
144
 
145
145
        int TimeEstimator::estimateWINX()
146
146
        {
147
 
                const TorrentStats& s = m_tc->getStats();
148
 
 
149
147
                if (m_samples->sum() > 0 && m_samples->count() > 0)
150
148
                        return (Uint32) floor((double) bytesLeft() / ((double) m_samples->sum() / (double) m_samples->count()));
151
149
 
154
152
 
155
153
        int TimeEstimator::estimateMAVG()
156
154
        {
157
 
                const TorrentStats& s = m_tc->getStats();
158
 
 
159
155
                if (m_samples->count() > 0)
160
156
                {
161
157
                        double lavg;