diff --git a/server/TracyView.cpp b/server/TracyView.cpp index a974df4d..dcb5bc74 100755 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -299,6 +299,18 @@ void View::UpdateZone( Event* zone ) assert( zone->end != -1 ); } +uint64_t View::GetLastTime() +{ + uint64_t last = 0; + if( !m_frames.empty() ) last = m_frames.back(); + if( !m_timeline.empty() ) + { + auto ev = m_timeline.back(); + if( ev->end > (int64_t)last ) last = ev->end; + } + return last; +} + void View::Draw() { s_instance->DrawImpl(); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index d9ae7d4f..d6f5d3c6 100755 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -48,6 +48,8 @@ private: void NewZone( Event* zone ); void UpdateZone( Event* zone ); + uint64_t GetLastTime(); + void DrawImpl(); std::string m_addr;