mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Retrieval of last recorded event's time.
This commit is contained in:
parent
3eb17e9969
commit
b259dc94f8
@ -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();
|
||||
|
@ -48,6 +48,8 @@ private:
|
||||
void NewZone( Event* zone );
|
||||
void UpdateZone( Event* zone );
|
||||
|
||||
uint64_t GetLastTime();
|
||||
|
||||
void DrawImpl();
|
||||
|
||||
std::string m_addr;
|
||||
|
Loading…
Reference in New Issue
Block a user