From cca085d3a6b349263b95e78e1502725e9abada45 Mon Sep 17 00:00:00 2001 From: HengBai Date: Tue, 22 Jul 2025 07:28:02 +0000 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=B3=BB=E7=BB=9F=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=90=8C=E6=AD=A5=E5=90=8E=EF=BC=8C=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BA=8B=E4=BB=B6=E6=8E=A5=E5=8F=A3=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: HengBai --- services/common/src/bundle_active_core.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/common/src/bundle_active_core.cpp b/services/common/src/bundle_active_core.cpp index f869d2e..0c918ec 100644 --- a/services/common/src/bundle_active_core.cpp +++ b/services/common/src/bundle_active_core.cpp @@ -522,6 +522,11 @@ int64_t WEAK_FUNC BundleActiveCore::CheckTimeChangeAndGetWallTime(int32_t userId "diff is %{public}lld", (long long)actualSystemTime, (long long)actualRealTime, (long long)expectedSystemTime, (long long)diffSystemTime); if (std::abs(diffSystemTime) < TIME_CHANGE_THRESHOLD_MILLIS) { + //系统时间同步后,需要更新记录的开机时间戳 + if (std::abs(diffSystemTime) > TWO_SECONDS) { + realTimeShot_ = actualRealTime; + systemTimeShot_ = actualSystemTime; + } return actualSystemTime; } -- Gitee