From 193826df3549eed2ea923668bb7c88cd4579ae4d Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Sat, 16 Mar 2024 16:12:13 +0800 Subject: [PATCH] feat remove debug log from timer --- src/timer/task_queue_timeout.cc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/timer/task_queue_timeout.cc b/src/timer/task_queue_timeout.cc index e0a3fd2..cb6b640 100644 --- a/src/timer/task_queue_timeout.cc +++ b/src/timer/task_queue_timeout.cc @@ -3,9 +3,8 @@ #include "sled/units/time_delta.h" namespace sled { -TaskQueueTimeoutFactory::TaskQueueTimeout::TaskQueueTimeout( - TaskQueueTimeoutFactory &parent, - sled::TaskQueueBase::DelayPrecision precision) +TaskQueueTimeoutFactory::TaskQueueTimeout::TaskQueueTimeout(TaskQueueTimeoutFactory &parent, + sled::TaskQueueBase::DelayPrecision precision) : parent_(parent), precision_(precision) {} @@ -13,8 +12,7 @@ TaskQueueTimeoutFactory::TaskQueueTimeout::TaskQueueTimeout( TaskQueueTimeoutFactory::TaskQueueTimeout::~TaskQueueTimeout() {} void -TaskQueueTimeoutFactory::TaskQueueTimeout::Start(DurationMs duration_ms, - TimeoutID timeout_id) +TaskQueueTimeoutFactory::TaskQueueTimeout::Start(DurationMs duration_ms, TimeoutID timeout_id) { ASSERT(timeout_expiration_ == std::numeric_limits::max(), ""); timeout_expiration_ = parent_.get_time_() + duration_ms; @@ -32,9 +30,7 @@ TaskQueueTimeoutFactory::TaskQueueTimeout::Start(DurationMs duration_ms, precision_, [timeout_id, this]() { LOGV("timer", "Timeout expired: {}", timeout_id); - ASSERT(posted_task_expiration_ - != std::numeric_limits::max(), - ""); + ASSERT(posted_task_expiration_ != std::numeric_limits::max(), ""); posted_task_expiration_ = std::numeric_limits::max(); if (timeout_expiration_ == std::numeric_limits::max()) { @@ -44,7 +40,7 @@ TaskQueueTimeoutFactory::TaskQueueTimeout::Start(DurationMs duration_ms, const TimeMs now = parent_.get_time_(); if (timeout_expiration_ <= now) { timeout_expiration_ = std::numeric_limits::max(); - LOGD("timer", "Timeout Triggered: {}", timeout_id); + LOGV("timer", "Timeout Triggered: {}", timeout_id); parent_.on_expired_(timeout_id_); } else { const DurationMs remaining = timeout_expiration_ - now;