From 5ab7da1b3e8544d42dc514f7f551f48a7a705dbe Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 29 Apr 2024 14:03:04 +0800 Subject: [PATCH] 1 --- f8/app.cc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/f8/app.cc b/f8/app.cc index 2cda953..619ce03 100644 --- a/f8/app.cc +++ b/f8/app.cc @@ -234,18 +234,11 @@ namespace f8 has_task = user_app_->HasTask(); } if (!has_task) { -#if 0 - int sleep_time = 1; - loop_cond_->wait_for(lk, std::chrono::milliseconds(sleep_time)); -#else int sleep_time = f8::Timer::Instance()->GetIdleTime(); loop_cond_->wait_for(lk, std::chrono::milliseconds(sleep_time)); - #if 0 - if (sleep_time > perf.max_timer_idle) { - perf.max_timer_idle = sleep_time; - } - #endif -#endif + } else { + int sleep_time = 1; + loop_cond_->wait_for(lk, std::chrono::milliseconds(sleep_time)); } }