Browse Source

Assign global::wallclock instead of calling Timer::reset().

Tatsuhiro Tsujikawa 14 years ago
parent
commit
bd4d3a27b3
3 changed files with 4 additions and 3 deletions
  1. 1 1
      src/FileEntry.cc
  2. 1 1
      src/FtpFinishDownloadCommand.cc
  3. 2 1
      src/PeerAddrEntry.cc

+ 1 - 1
src/FileEntry.cc

@@ -217,7 +217,7 @@ FileEntry::findFasterRequest(const SharedHandle<Request>& base)
     SharedHandle<Request> fastestRequest = requestPool_.front();
     requestPool_.pop_front();
     inFlightRequests_.push_back(fastestRequest);
-    lastFasterReplace_.reset();
+    lastFasterReplace_ = global::wallclock;
     return fastestRequest;
   }
   return SharedHandle<Request>();

+ 1 - 1
src/FtpFinishDownloadCommand.cc

@@ -77,7 +77,7 @@ bool FtpFinishDownloadCommand::execute()
   }
   try {
     if(readEventEnabled() || hupEventEnabled()) {
-      getCheckPoint().reset();
+      getCheckPoint() = global::wallclock;
       unsigned int status = ftpConnection_->receiveResponse();
       if(status == 0) {
         getDownloadEngine()->addCommand(this);

+ 2 - 1
src/PeerAddrEntry.cc

@@ -33,6 +33,7 @@
  */
 /* copyright --> */
 #include "PeerAddrEntry.h"
+#include "wallclock.h"
 
 namespace aria2 {
 
@@ -61,7 +62,7 @@ PeerAddrEntry& PeerAddrEntry::operator=(const PeerAddrEntry& c)
 
 void PeerAddrEntry::notifyUpdate()
 {
-  lastUpdated_.reset();
+  lastUpdated_ = global::wallclock;
 }
 
 bool PeerAddrEntry::operator==(const PeerAddrEntry& entry) const