summaryrefslogtreecommitdiff
path: root/src/TimeBasedCommand.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/TimeBasedCommand.cc')
-rw-r--r--src/TimeBasedCommand.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/TimeBasedCommand.cc b/src/TimeBasedCommand.cc
index 2d438b27..23ee5248 100644
--- a/src/TimeBasedCommand.cc
+++ b/src/TimeBasedCommand.cc
@@ -34,6 +34,7 @@
/* copyright --> */
#include "TimeBasedCommand.h"
#include "DownloadEngine.h"
+#include "wallclock.h"
namespace aria2 {
@@ -51,8 +52,8 @@ bool TimeBasedCommand::execute()
if(_exit) {
return true;
}
- if(_checkPoint.elapsed(_interval)) {
- _checkPoint.reset();
+ if(_checkPoint.difference(global::wallclock) >= _interval) {
+ _checkPoint = global::wallclock;
process();
if(_exit) {
return true;