From cf259473d9555416b58ffea93af82b6a569cf571 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 26 Sep 2025 18:51:53 +0200 Subject: [PATCH] Show centiseconds in LightmapGI bake time printout in the editor On modern high-end GPUs, bake times are regularly under 15 seconds, especially with preview-quality settings. In this case, sub-second differences can be significant for benchmarking, so it's worth showing them. --- editor/scene/3d/lightmap_gi_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/scene/3d/lightmap_gi_editor_plugin.cpp b/editor/scene/3d/lightmap_gi_editor_plugin.cpp index c83814745c..166511e546 100644 --- a/editor/scene/3d/lightmap_gi_editor_plugin.cpp +++ b/editor/scene/3d/lightmap_gi_editor_plugin.cpp @@ -166,8 +166,8 @@ void LightmapGIEditorPlugin::bake_func_end(uint64_t p_time_started) { tmp_progress = nullptr; } - const int time_taken = (OS::get_singleton()->get_ticks_msec() - p_time_started) * 0.001; - print_line(vformat("Done baking lightmaps in %02d:%02d:%02d.", time_taken / 3600, (time_taken % 3600) / 60, time_taken % 60)); + const int time_taken = OS::get_singleton()->get_ticks_msec() - p_time_started; + print_line(vformat("Done baking lightmaps in %02d:%02d:%02d.%02d.", time_taken / 3'600'000, (time_taken % 3'600'000) / 60'000, (time_taken % 60'000) / 1000, (time_taken % 1000) / 10)); // Request attention in case the user was doing something else. // Baking lightmaps is likely the editor task that can take the most time, // so only request the attention for baking lightmaps.