diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-08 18:44:31 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-08 18:44:31 +0100 |
commit | 65be895825a61ae463d09604634b064570febdc2 (patch) | |
tree | 790ceda8e9372405a0473a0534128ad24198b1fb /common/log.h | |
parent | b8200434209c317ebc4883b9f87513991bae33e3 (diff) | |
download | sink-65be895825a61ae463d09604634b064570febdc2.tar.gz sink-65be895825a61ae463d09604634b064570febdc2.zip |
Trace some timings.
Diffstat (limited to 'common/log.h')
-rw-r--r-- | common/log.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/log.h b/common/log.h index 7d02634..bf133c4 100644 --- a/common/log.h +++ b/common/log.h | |||
@@ -55,6 +55,18 @@ QByteArrayList SINKCOMMON_EXPORT debugOutputFields(); | |||
55 | 55 | ||
56 | QDebug SINKCOMMON_EXPORT debugStream(DebugLevel debugLevel, int line, const char* file, const char* function, const char* debugArea = 0); | 56 | QDebug SINKCOMMON_EXPORT debugStream(DebugLevel debugLevel, int line, const char* file, const char* function, const char* debugArea = 0); |
57 | 57 | ||
58 | struct SINKCOMMON_EXPORT TraceTime | ||
59 | { | ||
60 | TraceTime(int i) : time(i){}; | ||
61 | const int time; | ||
62 | }; | ||
63 | |||
64 | inline QDebug SINKCOMMON_EXPORT operator<<(QDebug d, const TraceTime &time) | ||
65 | { | ||
66 | d << time.time << "[ms]"; | ||
67 | return d; | ||
68 | } | ||
69 | |||
58 | } | 70 | } |
59 | } | 71 | } |
60 | 72 | ||