fix merge issues

This commit is contained in:
arvidn 2016-04-24 16:43:45 -04:00
parent dec093dc1a
commit b5ecfa4f91
3 changed files with 8 additions and 7 deletions

View File

@ -1006,7 +1006,8 @@ namespace libtorrent
// +1 is here to make it possible to distinguish uninitialized (to
// 0) timestamps and timestamps of things that happend during the
// first second after the session was constructed
boost::int64_t const ret = total_seconds(clock_type::now() - m_created) + 1;
boost::int64_t const ret = total_seconds(aux::time_now()
- m_created) + 1;
TORRENT_ASSERT(ret >= 0);
TORRENT_ASSERT(ret <= (std::numeric_limits<boost::uint16_t>::max)());
return static_cast<boost::uint16_t>(ret);

View File

@ -3205,7 +3205,7 @@ namespace aux {
m_last_second_tick = now;
m_tick_residual += tick_interval_ms - 1000;
boost::int64_t const stime = session_time();
boost::int32_t const stime = session_time();
if (stime > 65000)
{
// we're getting close to the point where our timestamps

View File

@ -8975,21 +8975,21 @@ namespace libtorrent
if (m_started < seconds && !is_paused())
{
int lost_seconds = seconds - m_started;
int const lost_seconds = seconds - m_started;
m_active_time += lost_seconds;
}
m_started = clamped_subtract(m_started, seconds);
if (m_became_seed < seconds && is_seed())
{
int lost_seconds = seconds - m_became_seed;
int const lost_seconds = seconds - m_became_seed;
m_seeding_time += lost_seconds;
}
m_became_seed = clamped_subtract(m_became_seed, seconds);
if (m_finished_time < seconds && is_finished())
{
int lost_seconds = seconds - m_became_finished;
int const lost_seconds = seconds - m_became_finished;
m_finished_time += lost_seconds;
}
m_became_finished = clamped_subtract(m_became_finished, seconds);
@ -9021,8 +9021,8 @@ namespace libtorrent
int ret = 0;
boost::int64_t fin_time = finished_time();
boost::int64_t download_time = int(active_time()) - fin_time;
boost::int64_t const fin_time = finished_time();
boost::int64_t const download_time = int(active_time()) - fin_time;
// if we haven't yet met the seed limits, set the seed_ratio_not_met
// flag. That will make this seed prioritized