mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Add zone child time getter.
This commit is contained in:
parent
ef17699887
commit
06292f1a3f
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -161,6 +161,7 @@ private:
|
||||
|
||||
void SmallCallstackButton( const char* name, uint32_t callstack, int& idx );
|
||||
void SetViewToLastFrames();
|
||||
int64_t GetZoneChildTime( const ZoneEvent& zone );
|
||||
|
||||
flat_hash_map<const void*, bool, nohash<const void*>> m_visible;
|
||||
flat_hash_map<uint64_t, bool, nohash<uint64_t>> m_visibleMsgThread;
|
||||
|
Loading…
Reference in New Issue
Block a user