mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-12 19:31:47 +00:00
Add frame time accessors.
This commit is contained in:
parent
edb7fac230
commit
ef317fa2be
@ -323,6 +323,24 @@ uint64_t View::GetFrameTime( size_t idx ) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t View::GetFrameBegin( size_t idx ) const
|
||||||
|
{
|
||||||
|
assert( idx < m_frames.size() );
|
||||||
|
return m_frames[idx];
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64_t View::GetFrameEnd( size_t idx ) const
|
||||||
|
{
|
||||||
|
if( idx < m_frames.size() - 1 )
|
||||||
|
{
|
||||||
|
return m_frames[idx+1];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return GetLastTime();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uint64_t View::GetLastTime() const
|
uint64_t View::GetLastTime() const
|
||||||
{
|
{
|
||||||
uint64_t last = 0;
|
uint64_t last = 0;
|
||||||
|
@ -49,6 +49,8 @@ private:
|
|||||||
void UpdateZone( Event* zone );
|
void UpdateZone( Event* zone );
|
||||||
|
|
||||||
uint64_t GetFrameTime( size_t idx ) const;
|
uint64_t GetFrameTime( size_t idx ) const;
|
||||||
|
uint64_t GetFrameBegin( size_t idx ) const;
|
||||||
|
uint64_t GetFrameEnd( size_t idx ) const;
|
||||||
uint64_t GetLastTime() const;
|
uint64_t GetLastTime() const;
|
||||||
const char* TimeToString( uint64_t ns ) const;
|
const char* TimeToString( uint64_t ns ) const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user