mirror of
https://github.com/Relintai/voxelman.git
synced 2025-04-13 21:00:47 +02:00
Set start time in execute().
This commit is contained in:
parent
58af069429
commit
f1bee24803
@ -56,8 +56,12 @@ void VoxelJob::_execute() {
|
|||||||
if (should_return())
|
if (should_return())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
//int phase = _chunk->get_current_build_phase();
|
||||||
|
|
||||||
_chunk->build_phase();
|
_chunk->build_phase();
|
||||||
|
|
||||||
|
//print_error(String::num(get_current_execution_time()) + " phase: " + String::num(phase));
|
||||||
|
|
||||||
if (!_chunk->get_build_phase_done())
|
if (!_chunk->get_build_phase_done())
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -214,6 +218,12 @@ bool VoxelJob::should_return() {
|
|||||||
void VoxelJob::execute() {
|
void VoxelJob::execute() {
|
||||||
ERR_FAIL_COND(!has_method("_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");
|
call("_execute");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user