From 10ddba213625d3a9ae1202b31d2f642dde38bfa4 Mon Sep 17 00:00:00 2001
From: l00635678
Date: Mon, 3 Mar 2025 21:23:25 +0800
Subject: [PATCH] =?UTF-8?q?netmanager-CPP=5FCRASH-1=E6=AC=A1=20apr:0.02?=
=?UTF-8?q?=E6=AC=A1/=E5=8D=83=E5=B0=8F=E6=97=B6(=E6=8F=90=E7=A4=BA)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: k-lee9575
---
.../common => utils/common_utils}/include/ffrt_timer.h | 9 ---------
1 file changed, 9 deletions(-)
rename {services/common => utils/common_utils}/include/ffrt_timer.h (90%)
diff --git a/services/common/include/ffrt_timer.h b/utils/common_utils/include/ffrt_timer.h
similarity index 90%
rename from services/common/include/ffrt_timer.h
rename to utils/common_utils/include/ffrt_timer.h
index 05b62c30f..2e5111fa6 100755
--- a/services/common/include/ffrt_timer.h
+++ b/utils/common_utils/include/ffrt_timer.h
@@ -26,7 +26,6 @@
#include "ffrt.h"
#include "ffrt_inner.h"
-#include "net_mgr_log_wrapper.h"
namespace OHOS {
namespace NetManagerStandard {
@@ -51,18 +50,12 @@ public:
{
StopPro();
timer_ = ffrt_timer_start(ffrt_qos_default, interval, data, taskFun, true);
- if (timer_ == ffrt_error) {
- NETMGR_LOG_E("ffrt_timer_start err[%{public}d]", timer_);
- }
}
void StopPro()
{
if (timer_ != ffrt_error) {
auto ret = ffrt_timer_stop(ffrt_qos_default, timer_);
- if (ret == ffrt_error) {
- NETMGR_LOG_E("ffrt_timer_stop err[%{public}d]", ret);
- }
}
}
@@ -71,7 +64,6 @@ public:
if (stopStatus_ == false) {
return;
}
- NETMGR_LOG_D("start thread...");
stopStatus_ = false;
std::function startTask = [this, interval, taskFun]() {
while (!tryStopFlag_) {
@@ -93,7 +85,6 @@ public:
if (stopStatus_ || tryStopFlag_) {
return;
}
- NETMGR_LOG_D("stop thread...");
tryStopFlag_ = true;
std::unique_lock locker(mutex_);
timerCond_.wait(locker, [this] { return stopStatus_ == true; });
--
Gitee