diff options
Diffstat (limited to 'src/components/policy/policy_external/src')
4 files changed, 9 insertions, 9 deletions
diff --git a/src/components/policy/policy_external/src/cache_manager.cc b/src/components/policy/policy_external/src/cache_manager.cc index 00bb1e4a1c..6e9465eea4 100644 --- a/src/components/policy/policy_external/src/cache_manager.cc +++ b/src/components/policy/policy_external/src/cache_manager.cc @@ -1119,8 +1119,8 @@ bool CacheManager::SetUserPermissionsForApp( it_group->second != is_allowed) { *out_app_permissions_changed = true; - const TimevalStruct tm = date_time::DateTime::getCurrentTime(); - int64_t current_time_msec = date_time::DateTime::getmSecs(tm); + const date_time::TimeDuration tm = date_time::getCurrentTime(); + int64_t current_time_msec = date_time::getmSecs(tm); ucr.consent_last_updated = current_time_msec; LOG4CXX_DEBUG(logger_, "Updating consents time " << current_time_msec); } @@ -1333,7 +1333,7 @@ int CacheManager::TimeoutResponse() { CACHE_MANAGER_CHECK(0); sync_primitives::AutoLock auto_lock(cache_lock_); return pt_->policy_table.module_config.timeout_after_x_seconds * - date_time::DateTime::MILLISECONDS_IN_SECOND; + date_time::MILLISECONDS_IN_SECOND; } bool CacheManager::SecondsBetweenRetries(std::vector<int>& seconds) { @@ -2651,8 +2651,8 @@ void CacheManager::SetExternalConsentForApp( (*(*pt_->policy_table.device_data)[permissions.device_id] .user_consent_records)[permissions.policy_app_id]; - const TimevalStruct tm = date_time::DateTime::getCurrentTime(); - int64_t current_time_msec = date_time::DateTime::getmSecs(tm); + const date_time::TimeDuration tm = date_time::getCurrentTime(); + int64_t current_time_msec = date_time::getmSecs(tm); app_consent_records.ext_consent_last_updated = current_time_msec; LOG4CXX_DEBUG(logger_, "Updating consents time " << current_time_msec); diff --git a/src/components/policy/policy_external/src/policy_manager_impl.cc b/src/components/policy/policy_external/src/policy_manager_impl.cc index 56de26af64..07afb2fe22 100644 --- a/src/components/policy/policy_external/src/policy_manager_impl.cc +++ b/src/components/policy/policy_external/src/policy_manager_impl.cc @@ -1507,7 +1507,7 @@ void PolicyManagerImpl::CalculateGroupsConsentFromExternalConsent( 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; diff --git a/src/components/policy/policy_external/src/sql_pt_representation.cc b/src/components/policy/policy_external/src/sql_pt_representation.cc index b05716dc3f..368dfa80f2 100644 --- a/src/components/policy/policy_external/src/sql_pt_representation.cc +++ b/src/components/policy/policy_external/src/sql_pt_representation.cc @@ -235,10 +235,10 @@ int SQLPTRepresentation::TimeoutResponse() { utils::dbms::SQLQuery query(db()); if (!query.Prepare(sql_pt::kSelectTimeoutResponse) || !query.Exec()) { LOG4CXX_INFO(logger_, "Can not select timeout response for retry sequence"); - const int defaultTimeout = 30 * date_time::DateTime::MILLISECONDS_IN_SECOND; + const int defaultTimeout = 30 * date_time::MILLISECONDS_IN_SECOND; return defaultTimeout; } - return query.GetInteger(0) * date_time::DateTime::MILLISECONDS_IN_SECOND; + return query.GetInteger(0) * date_time::MILLISECONDS_IN_SECOND; } bool SQLPTRepresentation::SecondsBetweenRetries(std::vector<int>* seconds) { diff --git a/src/components/policy/policy_external/src/usage_statistics/counter.cc b/src/components/policy/policy_external/src/usage_statistics/counter.cc index 661ea29704..e2c4d59b0e 100644 --- a/src/components/policy/policy_external/src/usage_statistics/counter.cc +++ b/src/components/policy/policy_external/src/usage_statistics/counter.cc @@ -107,7 +107,7 @@ AppStopwatchImpl::~AppStopwatchImpl() {} void AppStopwatchImpl::Start(AppStopwatchId stopwatch_type) { stopwatch_type_ = stopwatch_type; - timer_.Start(time_out_ * date_time::DateTime::MILLISECONDS_IN_SECOND, + timer_.Start(time_out_ * date_time::MILLISECONDS_IN_SECOND, timer::kPeriodic); } |