summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-08-28 12:04:05 +0300
committerTor Lillqvist <tml@collabora.com>2017-08-28 12:08:05 +0300
commit5921306259625996f8647c1138d310b0cdbe3d7e (patch)
tree4dd3ecd5d0383f2af43cdd3862b89ff2ce4ccf75 /comphelper
parent8c8edfabdee656ac5a9a0b1106f90baf315f1dd4 (diff)
Log also the elapsed time of each zone, in milliseconds
Why not let the computer do it, instead of having to do it by eyeball? It is not fun to look at numbers like 1503910660.06171 and 1503910665.5169 and try to see whether their difference is larger than that of 1503910824.20391 and 1503910828.43125. Change-Id: If20882e97959e65b8518b66c4ae965e1b3cc3b51
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/profilezone.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/comphelper/source/misc/profilezone.cxx b/comphelper/source/misc/profilezone.cxx
index dacd098442a9..44a1be0f44a8 100644
--- a/comphelper/source/misc/profilezone.cxx
+++ b/comphelper/source/misc/profilezone.cxx
@@ -52,7 +52,8 @@ long long addRecording(const char * aProfileId, long long aCreateTime)
g_aRecording.push_back(
OUString::number(osl_getThreadIdentifier(nullptr)) + " " +
OUString::number(aTime/1000000.0) + " " + aString + ": " +
- (aCreateTime == 0 ? OUString("start") : OUString("stop"))
+ (aCreateTime == 0 ? OUString("start") : OUString("stop")) +
+ (aCreateTime != 0 ? (" " + OUString::number((aTime - aCreateTime)/1000.0) + " ms") : OUString(""))
);
if (aCreateTime == 0)
{