forked from premiere/premiere-libtorrent
remove unused m_tick_residual accounting
This commit is contained in:
parent
8267d05139
commit
9e5822dfba
|
@ -1193,16 +1193,6 @@ namespace libtorrent
|
|||
void received_buffer(int size) override;
|
||||
void sent_buffer(int size) override;
|
||||
|
||||
// each second tick the timer takes a little
|
||||
// bit longer than one second to trigger. The
|
||||
// extra time it took is accumulated into this
|
||||
// counter. Every time it exceeds 1000, torrents
|
||||
// will tick their timers 2 seconds instead of one.
|
||||
// this keeps the timers more accurate over time
|
||||
// as a kind of "leap second" to adjust for the
|
||||
// accumulated error
|
||||
std::int16_t m_tick_residual = 0;
|
||||
|
||||
#ifndef TORRENT_DISABLE_LOGGING
|
||||
virtual bool should_log() const override;
|
||||
virtual void session_log(char const* fmt, ...) const override TORRENT_FORMAT(2,3);
|
||||
|
|
|
@ -3051,8 +3051,6 @@ namespace aux {
|
|||
|
||||
int const tick_interval_ms = aux::numeric_cast<int>(total_milliseconds(now - m_last_second_tick));
|
||||
m_last_second_tick = now;
|
||||
m_tick_residual = aux::numeric_cast<std::int16_t>(m_tick_residual + tick_interval_ms - 1000);
|
||||
TORRENT_ASSERT(m_tick_residual >= 0);
|
||||
|
||||
std::int32_t const stime = session_time();
|
||||
if (stime > 65000)
|
||||
|
@ -3332,7 +3330,6 @@ namespace aux {
|
|||
}
|
||||
}
|
||||
|
||||
m_tick_residual = m_tick_residual % 1000;
|
||||
// m_peer_pool.release_memory();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue