diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-08-10 01:17:28 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-08-10 01:17:28 +0900 |
| commit | e8e3a6f259ab74c486aec9b5ea95d3e1f5068f6c (patch) | |
| tree | 81530df222473d79cf39e007729b0d882441ebfb /src/TimeBasedCommand.cc | |
| parent | 97f34ab6682d83d9a0265a4291b44eaf45703493 (diff) | |
wallclock is now retrieved using global::wallclock() call.
This is necessary to avoid global variable initialization order
problem.
Diffstat (limited to 'src/TimeBasedCommand.cc')
| -rw-r--r-- | src/TimeBasedCommand.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/TimeBasedCommand.cc b/src/TimeBasedCommand.cc index 78891c00..50d1ff03 100644 --- a/src/TimeBasedCommand.cc +++ b/src/TimeBasedCommand.cc @@ -42,7 +42,7 @@ TimeBasedCommand::TimeBasedCommand(cuid_t cuid, DownloadEngine* e, time_t interval, bool routineCommand): Command(cuid), e_(e),exit_(false), interval_(interval), - routineCommand_(routineCommand), checkPoint_(global::wallclock) {} + routineCommand_(routineCommand), checkPoint_(global::wallclock()) {} TimeBasedCommand::~TimeBasedCommand() {} @@ -52,8 +52,8 @@ bool TimeBasedCommand::execute() if(exit_) { return true; } - if(checkPoint_.difference(global::wallclock) >= interval_) { - checkPoint_ = global::wallclock; + if(checkPoint_.difference(global::wallclock()) >= interval_) { + checkPoint_ = global::wallclock(); process(); if(exit_) { return true; |
