From: xue <2144439972@qq.com> Date: Sat, 20 Sep 2025 10:19:08 +0000 (+0800) Subject: 优化定时器 X-Git-Tag: leiniao_debug_1.0.0_20250922_020716~34 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=003eff686fd83a66ed382378d3ccaf4ae250177d;p=mirrors%2FFD230.git 优化定时器 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp index 1b6207b26..f84196ab4 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp @@ -65,10 +65,10 @@ ThunderBirdModel::~ThunderBirdModel() { // 停止所有定时器 - StopTimer(); + StopTimeDisplayTimer(); StopOtaCountdown(); StopCountUpTimer(); - StopReminderHideTimer(); + //StopReminderHideTimer(); // 停止录音 if (IsRecording()) { @@ -138,20 +138,6 @@ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Reminder hide timer started: %d seconds", m_reminderHideTime); } - void ThunderBirdModel::StopReminderHideTimer(void) - { - if (g_reminderHideTimer != nullptr) - { - osTimerStop(g_reminderHideTimer); - osStatus_t ret = osTimerDelete(g_reminderHideTimer); - if (ret != osOK) - { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "StopReminderHideTimer delete failed, ret = %lx!!", ret); - } - g_reminderHideTimer = nullptr; - } - } - // ---------------------- OTA 倒计时定时器(已整合到新定时器系统) ---------------------- void ThunderBirdModel::StartOtaCountdown(uint32_t startVal) { diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp index c66fb007f..bca98d4c6 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp @@ -59,10 +59,10 @@ namespace OHOS ThunderBirdPresenter::~ThunderBirdPresenter() { // 停止所有定时器和资源 - ThunderBirdModel::GetInstance()->StopTimer(); + ThunderBirdModel::GetInstance()->StopTimeDisplayTimer(); ThunderBirdModel::GetInstance()->StopOtaCountdown(); ThunderBirdModel::GetInstance()->StopCountUpTimer(); - ThunderBirdModel::GetInstance()->StopReminderHideTimer(); + //ThunderBirdModel::GetInstance()->StopReminderHideTimer(); // 停止录音 if (ThunderBirdModel::GetInstance()->IsRecording()) {