Set start time in execute().

This commit is contained in:
Relintai 2020-08-04 10:21:01 +02:00
parent 58af069429
commit f1bee24803

View File

@ -56,8 +56,12 @@ void VoxelJob::_execute() {
if (should_return())
return;
//int phase = _chunk->get_current_build_phase();
_chunk->build_phase();
//print_error(String::num(get_current_execution_time()) + " phase: " + String::num(phase));
if (!_chunk->get_build_phase_done())
break;
}
@ -214,6 +218,12 @@ bool VoxelJob::should_return() {
void VoxelJob::execute() {
ERR_FAIL_COND(!has_method("_execute"));
#if VERSION_MAJOR < 4
_start_time = OS::get_singleton()->get_system_time_msecs();
#else
_start_time = OS::get_singleton()->get_ticks_msec();
#endif
call("_execute");
}