mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +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
|
uint64_t View::GetZoneEnd( const Event& ev ) const
|
||||||
{
|
{
|
||||||
if( ev.end != -1 ) return ev.end;
|
auto ptr = &ev;
|
||||||
if( ev.child.empty() ) return ev.start;
|
for(;;)
|
||||||
return GetZoneEnd( *ev.child.back() );
|
{
|
||||||
|
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
|
const char* View::TimeToString( uint64_t ns ) const
|
||||||
|
Loading…
Reference in New Issue
Block a user