睡眠,训练定时器删除增加停止定时器操作
authorluozheng <1732036298@qq.com>
Sat, 7 Sep 2024 09:59:55 +0000 (17:59 +0800)
committerluozheng <1732036298@qq.com>
Sat, 7 Sep 2024 09:59:55 +0000 (17:59 +0800)
code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepModel.cpp
code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingModel.cpp

index 998a824..5fa4183 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * @Author: penglei 1624952103@qq.com
  * @Date: SLEPPNOTIFY24-06-26 19:36:48
- * @LastEditors: penglei 1624952103@qq.com
- * @LastEditTime: 2024-09-07 12:03:34
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-09-07 17:56:51
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepModel.cpp
  * @Description:
  *
@@ -787,6 +787,7 @@ namespace OHOS
         if (g_timer != NULL)
         {
             // 删除定时器并置为 NULL
+            osTimerStop(g_timer);
             osStatus_t ret = osTimerDelete(g_timer);
             if (ret != osOK)
             {
index 43827fb..fd8cf06 100644 (file)
@@ -1373,6 +1373,7 @@ namespace OHOS
         {
             if (g_startCounting != NULL)
             {
+                PauseTimer();
                 osStatus_t ret = osTimerDelete(g_startCounting);
                 if (ret != osOK)
                 {