From eb7c0b587454856268431b1c00e51055921b7abe Mon Sep 17 00:00:00 2001 From: rakshasa Date: Fri, 13 Oct 2006 12:59:51 +0000 Subject: [PATCH] * Made FileManager::close_least_active() work when cachedTime is before any of the open file's last touched timer. * Display upload total, not download for both, in the download info screen. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@787 e378c898-3ddf-0310-93e7-cc216c733640 --- rak/timer.h | 3 +++ src/ui/download.cc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rak/timer.h b/rak/timer.h index b190b300..77a96cb8 100644 --- a/rak/timer.h +++ b/rak/timer.h @@ -37,6 +37,7 @@ #ifndef RAK_TIMER_H #define RAK_TIMER_H +#include #include #include @@ -60,6 +61,8 @@ class timer { static timer from_seconds(uint32_t seconds) { return rak::timer((uint64_t)seconds * 1000000); } static timer from_milliseconds(uint32_t seconds) { return rak::timer((uint64_t)seconds * 1000); } + static timer max() { return std::numeric_limits::max(); } + bool operator < (const timer& t) const { return m_time < t.m_time; } bool operator > (const timer& t) const { return m_time > t.m_time; } bool operator <= (const timer& t) const { return m_time <= t.m_time; } diff --git a/src/ui/download.cc b/src/ui/download.cc index 24e76eb5..22bad7cc 100644 --- a/src/ui/download.cc +++ b/src/ui/download.cc @@ -173,7 +173,7 @@ Download::create_info() { element->push_column("Receive buffer:", te_value(&torrent::ConnectionManager::receive_buffer_size, value_base::flag_kb), " KB"); element->push_back(""); - element->push_column("Upload:", te_variable_value("up_rate", value_base::flag_kb), " KB / ", te_variable_value("down_total", value_base::flag_xb)); + element->push_column("Upload:", te_variable_value("up_rate", value_base::flag_kb), " KB / ", te_variable_value("up_total", value_base::flag_xb)); element->push_column("Download:", te_variable_value("down_rate", value_base::flag_kb), " KB / ", te_variable_value("down_total", value_base::flag_xb)); element->set_column_width(element->column_width() + 1);