Mercurial > hg > svcore
diff base/Debug.h @ 1877:258e356b1a7b
Merge from branch startup-timing
author | Chris Cannam |
---|---|
date | Mon, 22 Jun 2020 16:57:09 +0100 |
parents | 166d7a4c2cd6 |
children |
line wrap: on
line diff
--- a/base/Debug.h Thu Jun 18 15:42:19 2020 +0100 +++ b/base/Debug.h Mon Jun 22 16:57:09 2020 +0100 @@ -18,6 +18,7 @@ #include <QDebug> #include <QTextStream> +#include <QElapsedTimer> #include "RealTime.h" @@ -46,7 +47,7 @@ if (m_silenced) return *this; if (m_ok) { if (m_eol) { - m_stream << m_prefix << " "; + m_stream << m_prefix << "/" << m_timer.elapsed() << ": "; } m_stream << t; m_eol = false; @@ -68,6 +69,7 @@ char *m_prefix; bool m_ok; bool m_eol; + QElapsedTimer m_timer; static bool m_silenced; };