* Moved Timer to rak/timer.h.

* Added position affinity to ChunkSelector, still needs more work to
make it move forward without needing to finish all pieces.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@604 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-12-04 21:08:17 +00:00
parent a1a07c47aa
commit 32a3619cd8
39 changed files with 175 additions and 143 deletions
+4 -4
View File
@@ -59,7 +59,7 @@ Control::Control() :
m_inputStdin->slot_pressed(sigc::mem_fun(m_input, &input::Manager::pressed));
m_taskShutdown.set_iterator(utils::taskScheduler.end());
m_taskShutdown.set_iterator(taskScheduler.end());
m_taskShutdown.set_slot(sigc::mem_fun(*this, &Control::receive_shutdown));
}
@@ -90,7 +90,7 @@ Control::initialize() {
void
Control::cleanup() {
utils::taskScheduler.erase(&m_taskShutdown);
taskScheduler.erase(&m_taskShutdown);
m_inputStdin->remove(m_core->get_poll_manager()->get_torrent_poll());
@@ -113,8 +113,8 @@ Control::receive_shutdown() {
m_core->shutdown(false);
m_shutdownReceived = true;
if (!utils::taskScheduler.is_scheduled(&m_taskShutdown))
utils::taskScheduler.insert(&m_taskShutdown, utils::Timer::cache() + 5 * 1000000);
if (!taskScheduler.is_scheduled(&m_taskShutdown))
taskScheduler.insert(&m_taskShutdown, cachedTime + 5 * 1000000);
} else {
m_core->shutdown(true);