diff --git a/src/tracker_manager.cpp b/src/tracker_manager.cpp index 69c614ba8..a240c57d6 100644 --- a/src/tracker_manager.cpp +++ b/src/tracker_manager.cpp @@ -64,8 +64,8 @@ namespace namespace libtorrent { timeout_handler::timeout_handler(io_service& ios) - : m_start_time(time_now()) - , m_read_time(time_now()) + : m_start_time(time_now_hires()) + , m_read_time(m_start_time) , m_timeout(ios) , m_completion_timeout(0) , m_read_timeout(0) @@ -76,7 +76,7 @@ namespace libtorrent { m_completion_timeout = completion_timeout; m_read_timeout = read_timeout; - m_start_time = m_read_time = time_now(); + m_start_time = m_read_time = time_now_hires(); if (m_abort) return; @@ -90,7 +90,7 @@ namespace libtorrent void timeout_handler::restart_read_timeout() { - m_read_time = time_now(); + m_read_time = time_now_hires(); } void timeout_handler::cancel() @@ -106,7 +106,7 @@ namespace libtorrent if (error) return; if (m_completion_timeout == 0) return; - ptime now(time_now()); + ptime now = time_now_hires(); time_duration receive_timeout = now - m_read_time; time_duration completion_timeout = now - m_start_time;