summaryrefslogtreecommitdiff
path: root/include/comphelper/profilezone.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/comphelper/profilezone.hxx')
-rw-r--r--include/comphelper/profilezone.hxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx
index 4bdd6ad53fb5..32dc02e14f74 100644
--- a/include/comphelper/profilezone.hxx
+++ b/include/comphelper/profilezone.hxx
@@ -23,7 +23,6 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent
const char* m_sProfileId;
long long m_nCreateTime;
bool m_bConsole;
- void startConsole();
void stopConsole();
int m_nPid;
@@ -49,13 +48,18 @@ public:
: m_sProfileId(sProfileId ? sProfileId : "(null)")
, m_bConsole(bConsole)
{
- if (s_bRecording)
+ if (s_bRecording || m_bConsole)
{
TimeValue systemTime;
osl_getSystemTime(&systemTime);
m_nCreateTime
= static_cast<long long>(systemTime.Seconds) * 1000000 + systemTime.Nanosec / 1000;
+ }
+ else
+ m_nCreateTime = 0;
+ if (s_bRecording)
+ {
oslProcessInfo aProcessInfo;
aProcessInfo.Size = sizeof(oslProcessInfo);
if (osl_getProcessInfo(nullptr, osl_Process_IDENTIFIER, &aProcessInfo)
@@ -64,12 +68,6 @@ public:
s_nNesting++;
}
- else
- m_nCreateTime = 0;
- if (m_bConsole)
- {
- startConsole();
- }
}
~ProfileZone()