diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 1a112171..1f7cba7c 100755 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -323,6 +323,24 @@ uint64_t View::GetFrameTime( size_t idx ) const } } +uint64_t View::GetFrameBegin( size_t idx ) const +{ + assert( idx < m_frames.size() ); + return m_frames[idx]; +} + +uint64_t View::GetFrameEnd( size_t idx ) const +{ + if( idx < m_frames.size() - 1 ) + { + return m_frames[idx+1]; + } + else + { + return GetLastTime(); + } +} + uint64_t View::GetLastTime() const { uint64_t last = 0; diff --git a/server/TracyView.hpp b/server/TracyView.hpp index bc498e33..c2105a6b 100755 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -49,6 +49,8 @@ private: void UpdateZone( Event* zone ); uint64_t GetFrameTime( size_t idx ) const; + uint64_t GetFrameBegin( size_t idx ) const; + uint64_t GetFrameEnd( size_t idx ) const; uint64_t GetLastTime() const; const char* TimeToString( uint64_t ns ) const;