diff options
Diffstat (limited to 'src/components/policy/policy_regular/src/policy_manager_impl.cc')
-rw-r--r-- | src/components/policy/policy_regular/src/policy_manager_impl.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/components/policy/policy_regular/src/policy_manager_impl.cc b/src/components/policy/policy_regular/src/policy_manager_impl.cc index ebc695142e..f4b6f0ae03 100644 --- a/src/components/policy/policy_regular/src/policy_manager_impl.cc +++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc @@ -62,7 +62,7 @@ void DeleteManager(policy::PolicyManager* pm) { namespace { const uint32_t kDefaultRetryTimeoutInMSec = - 60u * date_time::DateTime::MILLISECONDS_IN_SECOND; + 60u * date_time::MILLISECONDS_IN_SECOND; } // namespace namespace policy { @@ -827,9 +827,9 @@ const PolicySettings& PolicyManagerImpl::get_settings() const { bool PolicyManagerImpl::ExceededDays() { LOG4CXX_AUTO_TRACE(logger_); - TimevalStruct current_time = date_time::DateTime::getCurrentTime(); + date_time::TimeDuration current_time = date_time::getCurrentTime(); const int kSecondsInDay = 60 * 60 * 24; - const int days = current_time.tv_sec / kSecondsInDay; + const int days = date_time::getSecs(current_time) / kSecondsInDay; return 0 == cache_->DaysBeforeExchange(days); } @@ -879,8 +879,7 @@ uint32_t PolicyManagerImpl::NextRetryTimeout() { } for (uint32_t i = 0u; i < retry_sequence_index_; ++i) { - next += retry_sequence_seconds_[i] * - date_time::DateTime::MILLISECONDS_IN_SECOND; + next += retry_sequence_seconds_[i] * date_time::MILLISECONDS_IN_SECOND; next += retry_sequence_timeout_; } ++retry_sequence_index_; |