From 6a7fdea6fdfe9918c645e0328f26859106ef19b5 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 10 Sep 2017 20:14:16 +0200 Subject: [PATCH] Store profiling start time. --- client/TracyProfiler.cpp | 3 ++- client/TracyProfiler.hpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 52c4c897..e1840785 100755 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -19,7 +19,8 @@ static inline int64_t GetTime() static Profiler* s_instance = nullptr; Profiler::Profiler() - : m_shutdown( false ) + : m_timeBegin( GetTime() ) + , m_shutdown( false ) , m_id( 0 ) { assert( PointerCheckA == PointerCheckB ); diff --git a/client/TracyProfiler.hpp b/client/TracyProfiler.hpp index 25268671..0b3db95e 100755 --- a/client/TracyProfiler.hpp +++ b/client/TracyProfiler.hpp @@ -25,6 +25,7 @@ public: private: void Worker(); + int64_t m_timeBegin; std::thread m_thread; std::atomic m_shutdown; moodycamel::ConcurrentQueue m_queue;