Set start time in execute().

This commit is contained in:
Relintai 2020-08-04 10:21:24 +02:00
parent 164ad82feb
commit 1473e2b5f1
2 changed files with 8 additions and 0 deletions

View File

@ -126,6 +126,12 @@ bool ThreadPoolJob::should_return() {
void ThreadPoolJob::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");
}

View File

@ -31,6 +31,8 @@ class ThreadPoolJob : public Reference {
GDCLASS(ThreadPoolJob, Reference);
public:
//is_running, is queued?
bool get_complete() const;
void set_complete(const bool value);