mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Add zone child time getter.
This commit is contained in:
@@ -8707,4 +8707,18 @@ void View::SetViewToLastFrames()
|
||||
}
|
||||
}
|
||||
|
||||
int64_t View::GetZoneChildTime( const ZoneEvent& zone )
|
||||
{
|
||||
int64_t time = 0;
|
||||
if( zone.child >= 0 )
|
||||
{
|
||||
for( auto& v : m_worker.GetZoneChildren( zone.child ) )
|
||||
{
|
||||
const auto childSpan = std::max( int64_t( 0 ), v->end - v->start );
|
||||
time += childSpan;
|
||||
}
|
||||
}
|
||||
return time;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user