mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Non-recursive version of GetZoneEnd.
This commit is contained in:
parent
3d6e85db4a
commit
cdab2297ef
@ -437,9 +437,13 @@ uint64_t View::GetLastTime() const
|
||||
|
||||
uint64_t View::GetZoneEnd( const Event& ev ) const
|
||||
{
|
||||
if( ev.end != -1 ) return ev.end;
|
||||
if( ev.child.empty() ) return ev.start;
|
||||
return GetZoneEnd( *ev.child.back() );
|
||||
auto ptr = &ev;
|
||||
for(;;)
|
||||
{
|
||||
if( ptr->end != -1 ) return ptr->end;
|
||||
if( ptr->child.empty() ) return ptr->start;
|
||||
ptr = ptr->child.back();
|
||||
}
|
||||
}
|
||||
|
||||
const char* View::TimeToString( uint64_t ns ) const
|
||||
|
Loading…
Reference in New Issue
Block a user