Report slow stop times only in release builds

This commit is contained in:
Nik Bougalis
2016-02-26 15:09:15 -08:00
committed by seelabs
parent 7c2e5f3ac8
commit bac303273f

View File

@@ -114,8 +114,13 @@ void Stoppable::stopAsyncRecursive (Journal j)
onStop ();
auto const ms = duration_cast<milliseconds>(
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)