From 94a455aba299af5ffe476560d859dfd007cd5467 Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期五, 16 四月 2021 12:13:43 +0800 Subject: [PATCH] fix crash by using normal timeout; add sendq todo. --- utest/util.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/utest/util.h b/utest/util.h index 7f41da9..f31d63f 100644 --- a/utest/util.h +++ b/utest/util.h @@ -39,9 +39,11 @@ using namespace std::chrono_literals; template <class D> -inline void Sleep(D d) +inline void Sleep(D d, bool print = true) { - printf("sleep for %ld ms\n", std::chrono::duration_cast<std::chrono::milliseconds>(d).count()); + if (print) { + printf("sleep for %ld ms\n", std::chrono::duration_cast<std::chrono::milliseconds>(d).count()); + } std::this_thread::sleep_for(d); } -- Gitblit v1.8.0