* Added slot map's for insert/erase, open/close, start/stop and

finished downloads in DownloadList, moved stuff from core::Manager to
the slot maps.

* Added check hash key ^r, though triggering check hash on finished
signals currently borks.

* Made tracker dump into an option.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@470 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-06-20 19:14:41 +00:00
parent 9a3d75490f
commit 7e77635353
16 changed files with 243 additions and 151 deletions
+2
View File
@@ -37,6 +37,7 @@ class Timer {
Timer(timeval tv) : m_time((int64_t)(uint32_t)tv.tv_sec * 1000000 + (int64_t)(uint32_t)tv.tv_usec % 1000000) {}
int64_t usec() const { return m_time; }
int32_t sec() const { return m_time / 1000000; }
timeval tval() const { return (timeval) { m_time / 1000000, m_time % 1000000}; }
Timer round_seconds() const { return (m_time / 1000000) * 1000000; }
@@ -55,6 +56,7 @@ class Timer {
// time. Though system calls would be more expensive than we can afford.
static Timer cache() { return Timer(m_cache); }
// TODO: Create sd::numeric_limits for these?
static Timer min() { return 0; }
static Timer max() { return (int64_t)std::numeric_limits<time_t>::max() * 1000000; }