mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-18 15:16:17 +00:00
Make rtorrent compatible with the latest HEAD.
This commit is contained in:
@@ -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) {}
|
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() const { return m_time / 1000000; }
|
||||||
|
int32_t seconds_ceiling() const { return (m_time + 1000000 - 1) / 1000000; }
|
||||||
int64_t usec() const { return m_time; }
|
int64_t usec() const { return m_time; }
|
||||||
|
|
||||||
timer round_seconds() const { return (m_time / 1000000) * 1000000; }
|
timer round_seconds() const { return (m_time / 1000000) * 1000000; }
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <torrent/rate.h>
|
#include <torrent/rate.h>
|
||||||
|
#include <torrent/tracker_controller.h>
|
||||||
#include <torrent/tracker_list.h>
|
#include <torrent/tracker_list.h>
|
||||||
#include <torrent/peer/connection_list.h>
|
#include <torrent/peer/connection_list.h>
|
||||||
#include <torrent/peer/peer_list.h>
|
#include <torrent/peer/peer_list.h>
|
||||||
@@ -91,7 +92,7 @@ WindowDownloadStatusbar::redraw() {
|
|||||||
position = print_download_status(buffer, last, m_download);
|
position = print_download_status(buffer, last, m_download);
|
||||||
m_canvas->print(0, 2, "[%c:%i] %s",
|
m_canvas->print(0, 2, "[%c:%i] %s",
|
||||||
m_download->tracker_list()->has_active() ? 'C' : ' ',
|
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);
|
buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user