1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

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.
This commit is contained in:
Hugo Locurcio
2025-09-26 18:51:53 +02:00
parent 1f7630f1bf
commit cf259473d9

View File

@@ -166,8 +166,8 @@ void LightmapGIEditorPlugin::bake_func_end(uint64_t p_time_started) {
tmp_progress = nullptr; tmp_progress = nullptr;
} }
const int time_taken = (OS::get_singleton()->get_ticks_msec() - p_time_started) * 0.001; const int time_taken = OS::get_singleton()->get_ticks_msec() - p_time_started;
print_line(vformat("Done baking lightmaps in %02d:%02d:%02d.", time_taken / 3600, (time_taken % 3600) / 60, time_taken % 60)); 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. // Request attention in case the user was doing something else.
// Baking lightmaps is likely the editor task that can take the most time, // Baking lightmaps is likely the editor task that can take the most time,
// so only request the attention for baking lightmaps. // so only request the attention for baking lightmaps.