diff --git a/services/time_manager/src/time_service.cpp b/services/time_manager/src/time_service.cpp index 1f6878f..35a5dc4 100644 --- a/services/time_manager/src/time_service.cpp +++ b/services/time_manager/src/time_service.cpp @@ -31,12 +31,12 @@ #include #include "pthread.h" -#include "time_service.h" #include "time_zone_info.h" #include "time_common.h" #include "system_ability.h" #include "system_ability_definition.h" #include "iservice_registry.h" +#include "time_service.h" namespace OHOS { namespace MiscServices { @@ -64,8 +64,8 @@ std::shared_ptr TimeService::timeServiceNotify_ std::shared_ptr TimeService::timerManagerHandler_ = nullptr; TimeService::TimeService(int32_t systemAbilityId, bool runOnCreate) - : SystemAbility(systemAbilityId, runOnCreate), - state_(ServiceRunningState::STATE_NOT_START), + : SystemAbility(systemAbilityId, runOnCreate), + state_(ServiceRunningState::STATE_NOT_START), rtc_id(get_wall_clock_rtc_id()) { TIME_HILOGI(TIME_MODULE_SERVICE, " TimeService Start."); @@ -240,7 +240,7 @@ uint64_t TimeService::CreateTimer(int32_t type, bool repeat, uint64_t interval, 0); } -bool TimeService::StartTimer(uint64_t timerId, uint64_t triggerTimes) +bool TimeService::StartTimer(uint64_t timerId, uint64_t triggerTimes) { uint64_t triggerTimesIn = (triggerTimes < MIN_TRIGGER_TIMES) ? MIN_TRIGGER_TIMES : triggerTimes; if (timerManagerHandler_ == nullptr) { @@ -275,7 +275,7 @@ bool TimeService::StopTimer(uint64_t timerId) return ret; } -bool TimeService::DestroyTimer(uint64_t timerId) +bool TimeService::DestroyTimer(uint64_t timerId) { if (timerManagerHandler_ == nullptr) { TIME_HILOGE(TIME_MODULE_SERVICE, "Timer manager nullptr."); diff --git a/services/timer/src/timer_manager.cpp b/services/timer/src/timer_manager.cpp index 962ee2a..48c26f9 100644 --- a/services/timer/src/timer_manager.cpp +++ b/services/timer/src/timer_manager.cpp @@ -390,7 +390,7 @@ bool TimerManager::TriggerTimersLocked(std::vector> & break; } alarmBatches_.erase(alarmBatches_.begin()); - TIME_HILOGI(TIME_MODULE_SERVICE, "after erase alarmBatches_.size= %{public}d", + TIME_HILOGI(TIME_MODULE_SERVICE, "after erase alarmBatches_.size= %{public}d", static_cast(alarmBatches_.size())); const auto n = batch->Size();