From d3b43bfa3713d2749a24b2f21a635c3df04ee19e Mon Sep 17 00:00:00 2001 From: Nik Bougalis Date: Fri, 26 Feb 2016 15:09:15 -0800 Subject: [PATCH] Report slow stop times only in release builds --- src/beast/beast/threads/impl/Stoppable.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/beast/beast/threads/impl/Stoppable.cpp b/src/beast/beast/threads/impl/Stoppable.cpp index dbbfdbdec8..05613f0406 100644 --- a/src/beast/beast/threads/impl/Stoppable.cpp +++ b/src/beast/beast/threads/impl/Stoppable.cpp @@ -114,8 +114,13 @@ void Stoppable::stopAsyncRecursive (Journal j) onStop (); auto const ms = duration_cast( high_resolution_clock::now() - start).count(); + +#ifdef NDEBUG if (ms >= 10) j.fatal << m_name << "::onStop took " << ms << "ms"; +#else + (void)ms; +#endif for (Children::const_iterator iter (m_children.cbegin ()); iter != m_children.cend(); ++iter)