summaryrefslogtreecommitdiffstats
path: root/common/log.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-08 18:44:31 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-08 18:44:31 +0100
commit65be895825a61ae463d09604634b064570febdc2 (patch)
tree790ceda8e9372405a0473a0534128ad24198b1fb /common/log.h
parentb8200434209c317ebc4883b9f87513991bae33e3 (diff)
downloadsink-65be895825a61ae463d09604634b064570febdc2.tar.gz
sink-65be895825a61ae463d09604634b064570febdc2.zip
Trace some timings.
Diffstat (limited to 'common/log.h')
-rw-r--r--common/log.h12
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
56QDebug SINKCOMMON_EXPORT debugStream(DebugLevel debugLevel, int line, const char* file, const char* function, const char* debugArea = 0); 56QDebug SINKCOMMON_EXPORT debugStream(DebugLevel debugLevel, int line, const char* file, const char* function, const char* debugArea = 0);
57 57
58struct SINKCOMMON_EXPORT TraceTime
59{
60 TraceTime(int i) : time(i){};
61 const int time;
62};
63
64inline 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