1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Save all 64 bits of get_ticks_msec() in more cases

This commit is contained in:
Max Hilbrunner
2021-10-26 08:44:50 +02:00
parent 64faa37e45
commit 5dc02eb8b0
8 changed files with 14 additions and 14 deletions

View File

@@ -148,11 +148,11 @@ void FindInFiles::_process() {
// This part can be moved to a thread if needed
OS &os = *OS::get_singleton();
float time_before = os.get_ticks_msec();
uint64_t time_before = os.get_ticks_msec();
while (is_processing()) {
_iterate();
float elapsed = (os.get_ticks_msec() - time_before);
if (elapsed > 1000.0 / 120.0) {
uint64_t elapsed = (os.get_ticks_msec() - time_before);
if (elapsed > 8) { // Process again after waiting 8 ticks
break;
}
}