1
0
mirror of https://github.com/wolfpld/tracy synced 2025-05-03 06:03:51 +00:00

Display captured program name and capture time.

This commit is contained in:
Bartosz Taudul 2018-08-29 01:00:29 +02:00
parent 8f1acf2571
commit 81655816f0

View File

@ -6329,12 +6329,20 @@ void View::DrawMemoryAllocWindow()
void View::DrawInfo() void View::DrawInfo()
{ {
char dtmp[64];
time_t date = m_worker.GetCaptureTime();
auto lt = localtime( &date );
strftime( dtmp, 64, "%F %T", lt );
const auto& io = ImGui::GetIO(); const auto& io = ImGui::GetIO();
ImGui::Begin( "Trace information", &m_showInfo ); ImGui::Begin( "Trace information", &m_showInfo );
TextFocused( "Profiler memory usage:", MemSizeToString( memUsage.load( std::memory_order_relaxed ) ) ); TextFocused( "Profiler memory usage:", MemSizeToString( memUsage.load( std::memory_order_relaxed ) ) );
TextFocused( "Profiler FPS:", RealToString( int( io.Framerate ), true ) ); TextFocused( "Profiler FPS:", RealToString( int( io.Framerate ), true ) );
ImGui::Separator(); ImGui::Separator();
TextFocused( "Captured program:", m_worker.GetCaptureProgram().c_str() );
TextFocused( "Capture time:", dtmp );
ImGui::Separator();
TextFocused( "Queue delay:", TimeToString( m_worker.GetDelay() ) ); TextFocused( "Queue delay:", TimeToString( m_worker.GetDelay() ) );
TextFocused( "Timer resolution:", TimeToString( m_worker.GetResolution() ) ); TextFocused( "Timer resolution:", TimeToString( m_worker.GetResolution() ) );
ImGui::Separator(); ImGui::Separator();