mirror of https://github.com/aria2/aria2
Assign global::wallclock instead of calling Timer::reset().
parent
5d498cb1ab
commit
bd4d3a27b3
|
@ -217,7 +217,7 @@ FileEntry::findFasterRequest(const SharedHandle<Request>& base)
|
||||||
SharedHandle<Request> fastestRequest = requestPool_.front();
|
SharedHandle<Request> fastestRequest = requestPool_.front();
|
||||||
requestPool_.pop_front();
|
requestPool_.pop_front();
|
||||||
inFlightRequests_.push_back(fastestRequest);
|
inFlightRequests_.push_back(fastestRequest);
|
||||||
lastFasterReplace_.reset();
|
lastFasterReplace_ = global::wallclock;
|
||||||
return fastestRequest;
|
return fastestRequest;
|
||||||
}
|
}
|
||||||
return SharedHandle<Request>();
|
return SharedHandle<Request>();
|
||||||
|
|
|
@ -77,7 +77,7 @@ bool FtpFinishDownloadCommand::execute()
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if(readEventEnabled() || hupEventEnabled()) {
|
if(readEventEnabled() || hupEventEnabled()) {
|
||||||
getCheckPoint().reset();
|
getCheckPoint() = global::wallclock;
|
||||||
unsigned int status = ftpConnection_->receiveResponse();
|
unsigned int status = ftpConnection_->receiveResponse();
|
||||||
if(status == 0) {
|
if(status == 0) {
|
||||||
getDownloadEngine()->addCommand(this);
|
getDownloadEngine()->addCommand(this);
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
*/
|
*/
|
||||||
/* copyright --> */
|
/* copyright --> */
|
||||||
#include "PeerAddrEntry.h"
|
#include "PeerAddrEntry.h"
|
||||||
|
#include "wallclock.h"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
|
@ -61,7 +62,7 @@ PeerAddrEntry& PeerAddrEntry::operator=(const PeerAddrEntry& c)
|
||||||
|
|
||||||
void PeerAddrEntry::notifyUpdate()
|
void PeerAddrEntry::notifyUpdate()
|
||||||
{
|
{
|
||||||
lastUpdated_.reset();
|
lastUpdated_ = global::wallclock;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PeerAddrEntry::operator==(const PeerAddrEntry& entry) const
|
bool PeerAddrEntry::operator==(const PeerAddrEntry& entry) const
|
||||||
|
|
Loading…
Reference in New Issue