mirror of
https://github.com/Relintai/thread_pool.git
synced 2024-11-12 10:25:29 +01:00
Set start time in execute().
This commit is contained in:
parent
164ad82feb
commit
1473e2b5f1
@ -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");
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user