/* */ #include "TimedHaltCommand.h" #include "DownloadEngine.h" #include "RequestGroupMan.h" #include "Logger.h" #include "message.h" namespace aria2 { TimedHaltCommand::TimedHaltCommand(int32_t cuid, DownloadEngine* e, time_t secondsToHalt): TimeBasedCommand(cuid, e, secondsToHalt, true) {} TimedHaltCommand::~TimedHaltCommand() {} void TimedHaltCommand::preProcess() { if(_e->_requestGroupMan->downloadFinished() || _e->isHaltRequested()) { _exit = true; } } void TimedHaltCommand::process() { if(!_e->isHaltRequested()) { logger->notice(MSG_TIME_HAS_PASSED, _interval); _e->requestHalt(); } } } // namespace aria2