diff options
Diffstat (limited to 'project2/cli')
-rw-r--r-- | project2/cli/claOptions.cpp | 9 | ||||
-rw-r--r-- | project2/cli/claOptions.h | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/project2/cli/claOptions.cpp b/project2/cli/claOptions.cpp index b1e1250..da6121d 100644 --- a/project2/cli/claOptions.cpp +++ b/project2/cli/claOptions.cpp @@ -12,7 +12,7 @@ CommandLineArguments::CommandLineArguments(int c, const char * const * v, const argc(c), argv(v), others(o), - loadedAt(0) + createdAt(boost::posix_time::microsec_clock::universal_time()) { } @@ -76,12 +76,11 @@ CommandLineArguments::loadInto(const ConfigConsumer & consume, const Options::Cu others(argv[x]); } } - time(&loadedAt); } -bool -CommandLineArguments::needReload() const +boost::posix_time::ptime +CommandLineArguments::modifiedTime() const { - return !loadedAt; + return createdAt; } diff --git a/project2/cli/claOptions.h b/project2/cli/claOptions.h index c669004..3f13b4b 100644 --- a/project2/cli/claOptions.h +++ b/project2/cli/claOptions.h @@ -8,13 +8,13 @@ class CommandLineArguments : public OptionsSource { typedef boost::function<void(const char * const)> Others; CommandLineArguments(int c, const char * const * v, const Others &); void loadInto(const ConfigConsumer & consume, const Options::CurrentPlatform & platform) const; - bool needReload() const; + boost::posix_time::ptime modifiedTime() const override; private: const int argc; const char * const * argv; const Others others; - mutable time_t loadedAt; + const boost::posix_time::ptime createdAt; }; #endif |