mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Retrieval of last recorded event's time.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user