睡眠时间更新 删除小睡的更新 3206/1 3206/head
authorCaisking <Casiking@zhihuishixun.com>
Sat, 7 Feb 2026 09:29:03 +0000 (17:29 +0800)
committerCaisking <Casiking@zhihuishixun.com>
Sat, 7 Feb 2026 09:29:03 +0000 (17:29 +0800)
code/sdk/application/wearable/fd272/nativeapp/nativeui/sleep/src/SleepModel.cpp

index 0a6a0ee..2fa4218 100644 (file)
@@ -384,8 +384,9 @@ namespace OHOS
     cywee_get_sleep_time_data(&nap_fall_asleep_timestamp, &nap_wake_up_timestamp, &nap_total, NAP_DATA_TYPE);
 #endif
 
-  //获取最新的出睡时间
-  sleep_update_time = nap_wake_up_timestamp>sleep_wake_up_timestamp?nap_wake_up_timestamp:sleep_wake_up_timestamp;
+  //获取最新的出睡时间 目前只需要睡眠时间
+  // sleep_update_time = nap_wake_up_timestamp>sleep_wake_up_timestamp?nap_wake_up_timestamp:sleep_wake_up_timestamp;
+  sleep_update_time = sleep_wake_up_timestamp;
 
   OHOS::SleepModel::GetInstance().set_sleep_total(sleep_total);
   OHOS::SleepModel::GetInstance().set_nap_total(nap_total);