MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / clear

Method clear

editor/debugger/editor_visual_profiler.cpp:113–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void EditorVisualProfiler::clear() {
114 int metric_size = EDITOR_GET("debugger/profiler_frame_history_size");
115 metric_size = CLAMP(metric_size, 60, 10000);
116 frame_metrics.clear();
117 frame_metrics.resize(metric_size);
118 last_metric = -1;
119 variables->clear();
120 //activate->set_pressed(false);
121
122 graph_limit = 1000.0f / CLAMP(int(EDITOR_GET("debugger/profiler_target_fps")), 1, 1000);
123
124 updating_frame = true;
125 cursor_metric_edit->set_min(0);
126 cursor_metric_edit->set_max(0);
127 cursor_metric_edit->set_value(0);
128 updating_frame = false;
129 hover_metric = -1;
130 seeking = false;
131}
132
133String EditorVisualProfiler::_get_time_as_text(float p_time) {
134 int dmode = display_mode->get_selected();

Callers 1

_update_frameMethod · 0.45

Calls 5

CLAMPFunction · 0.85
resizeMethod · 0.45
set_minMethod · 0.45
set_maxMethod · 0.45
set_valueMethod · 0.45

Tested by

no test coverage detected