From e9a065f9d89613df9544c6d63af4d06a24039159 Mon Sep 17 00:00:00 2001 From: Jari Sundell Date: Mon, 17 Oct 2011 13:09:26 +0900 Subject: [PATCH] Make rtorrent compatible with the latest HEAD. --- rak/timer.h | 1 + src/display/window_download_statusbar.cc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rak/timer.h b/rak/timer.h index 988bba2e..faaa0da0 100644 --- a/rak/timer.h +++ b/rak/timer.h @@ -50,6 +50,7 @@ class timer { timer(timeval tv) : m_time((int64_t)(uint32_t)tv.tv_sec * 1000000 + (int64_t)(uint32_t)tv.tv_usec % 1000000) {} int32_t seconds() const { return m_time / 1000000; } + int32_t seconds_ceiling() const { return (m_time + 1000000 - 1) / 1000000; } int64_t usec() const { return m_time; } timer round_seconds() const { return (m_time / 1000000) * 1000000; } diff --git a/src/display/window_download_statusbar.cc b/src/display/window_download_statusbar.cc index e2d61adb..92905988 100644 --- a/src/display/window_download_statusbar.cc +++ b/src/display/window_download_statusbar.cc @@ -37,6 +37,7 @@ #include "config.h" #include +#include #include #include #include @@ -91,7 +92,7 @@ WindowDownloadStatusbar::redraw() { position = print_download_status(buffer, last, m_download); m_canvas->print(0, 2, "[%c:%i] %s", m_download->tracker_list()->has_active() ? 'C' : ' ', - (int)(m_download->download()->time_next_connection()), + (int)(m_download->download()->tracker_controller()->seconds_to_next_timeout()), buffer); }