From fb5f4e82429f133505f41c3e22d715dd1cc621c5 Mon Sep 17 00:00:00 2001 From: oh_ci Date: Tue, 3 Jun 2025 01:24:16 +0000 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=20'Pull=20Request=20!14596?= =?UTF-8?q?=20:=20=E4=BF=AE=E5=A4=8DRestartSelfAtomicService=E6=8E=A5?= =?UTF-8?q?=E5=8F=A33=E7=A7=92=E5=86=85=E8=BF=9E=E7=BB=AD=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E6=B2=A1=E6=9C=89=E8=BF=94=E5=9B=9E=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=A0=81'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/abilitymgr/src/ability_manager_service.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/abilitymgr/src/ability_manager_service.cpp b/services/abilitymgr/src/ability_manager_service.cpp index b65ccdfec98..1b410f7fc89 100644 --- a/services/abilitymgr/src/ability_manager_service.cpp +++ b/services/abilitymgr/src/ability_manager_service.cpp @@ -14278,7 +14278,8 @@ int32_t AbilityManagerService::RestartSelfAtomicService(sptr call } RestartAppKeyType key(processInfo.instanceKey, callerUid); - int64_t now = time(nullptr); + int64_t now = std::chrono::duration_cast(std::chrono:: + system_clock::now().time_since_epoch()).count(); if (RestartAppManager::GetInstance().IsRestartAppFrequent(key, now)) { return AAFwk::ERR_RESTART_APP_FREQUENT; } -- Gitee