Ignore:
Timestamp:
Jan 29, 2011, 6:59:23 PM (11 years ago)
Author:
jordan
Message:

(trunk libT) #3950 "use libevent's cached gettimeofday() value when appropriate" -- fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-io.c

    r11718 r11783  
    8787};
    8888
     89
    8990/***
    9091****
     
    100101        const unsigned int payload = MIN( next->length, bytes_transferred );
    101102        const unsigned int overhead = guessPacketOverhead( payload );
    102         const uint64_t now = tr_time_msec( );
     103        const uint64_t now = tr_sessionGetTimeMsec( io->session );
    103104
    104105        tr_bandwidthUsed( &io->bandwidth, TR_UP, payload, next->isPieceData, now );
     
    140141    if( io->canRead )
    141142    {
     143        const uint64_t now = tr_sessionGetTimeMsec( io->session );
     144
    142145        tr_sessionLock( session );
    143146
     
    149152            const size_t used = oldLen - evbuffer_get_length( io->inbuf );
    150153            const unsigned int overhead = guessPacketOverhead( used );
    151             const uint64_t now = tr_time_msec( );
    152154
    153155            assert( tr_isPeerIo( io ) );
Note: See TracChangeset for help on using the changeset viewer.