GUI: add timing debug info
This commit is contained in:
parent
061b312943
commit
5d1785fb38
3 changed files with 35 additions and 0 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#include "gui.h"
|
||||
#include "debug.h"
|
||||
#include "IconsFontAwesome4.h"
|
||||
#include <SDL_timer.h>
|
||||
#include <fmt/printf.h>
|
||||
#include <imgui.h>
|
||||
|
||||
|
|
@ -370,6 +371,13 @@ void FurnaceGUI::drawDebug() {
|
|||
}
|
||||
ImGui::TreePop();
|
||||
}
|
||||
if (ImGui::TreeNode("Performance")) {
|
||||
double perfFreq=SDL_GetPerformanceFrequency()/1000000.0;
|
||||
ImGui::Text("render: %.0fµs",(double)renderTimeDelta/perfFreq);
|
||||
ImGui::Text("layout: %.0fµs",(double)layoutTimeDelta/perfFreq);
|
||||
ImGui::Text("event: %.0fµs",(double)eventTimeDelta/perfFreq);
|
||||
ImGui::TreePop();
|
||||
}
|
||||
if (ImGui::TreeNode("Settings")) {
|
||||
if (ImGui::Button("Sync")) syncSettings();
|
||||
ImGui::SameLine();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue