* 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
+5 -4
View File
@@ -37,15 +37,16 @@
#include "config.h"
#include <algorithm>
#include <rak/functional.h>
#include "globals.h"
#include "log.h"
#include "rak/functional.h"
namespace core {
void
Log::push_front(const std::string& msg) {
Base::push_front(Type(utils::Timer::cache(), msg));
Base::push_front(Type(cachedTime, msg));
if (size() > 50)
Base::pop_back();
@@ -54,8 +55,8 @@ Log::push_front(const std::string& msg) {
}
Log::iterator
Log::find_older(utils::Timer t) {
return std::find_if(begin(), end(), rak::on(rak::mem_ptr_ref(&Type::first), std::bind2nd(std::less_equal<utils::Timer>(), t)));
Log::find_older(rak::timer t) {
return std::find_if(begin(), end(), rak::on(rak::mem_ptr_ref(&Type::first), std::bind2nd(std::less_equal<rak::timer>(), t)));
}
}