Changeset 7265


Ignore:
Timestamp:
Dec 4, 2008, 3:31:14 AM (12 years ago)
Author:
charles
Message:

(libT) #1545: 1.41b1: speed temporarily jumps to 2x the upload limit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bandwidth.c

    r7173 r7265  
    3030    HISTORY_MSEC = 2000,
    3131    INTERVAL_MSEC = HISTORY_MSEC,
    32     GRANULARITY_MSEC = 40,
     32    GRANULARITY_MSEC = 50,
    3333    HISTORY_SIZE = ( INTERVAL_MSEC / GRANULARITY_MSEC ),
    3434    MAGIC_NUMBER = 43143
     
    255255    if( b->band[dir].isLimited )
    256256    {
     257        const double desiredSpeed = b->band[dir].desiredSpeed;
     258#if 0
    257259        const double currentSpeed = getSpeed( &b->band[dir].piece, HISTORY_MSEC - period_msec );
    258         const double desiredSpeed = b->band[dir].desiredSpeed;
    259260        const double pulseCount = ( HISTORY_MSEC - period_msec ) / (double)period_msec;
    260261        const double nextPulseSpeed = desiredSpeed * ( pulseCount + 1 ) - ( currentSpeed * pulseCount );
     262#else
     263        const double nextPulseSpeed = desiredSpeed;
     264#endif
    261265        b->band[dir].bytesLeft = MAX( 0.0, nextPulseSpeed * 1024.0 * period_msec / 1000.0 );
    262266
Note: See TracChangeset for help on using the changeset viewer.