40 case S_servicing_removed:
113 nassertr(_state != S_inactive, 0.0);
125 nassertr(_state != S_inactive, 0);
134 set_name(std::string());
180 nassertv(_state == S_inactive);
181 _done_event = done_event;
208 if (_num_frames == 0) {
211 return _total_dt / _num_frames;
A class to manage a loose queue of isolated tasks, which can be performed either synchronously (in th...
set_done_event
Sets the event name that will be triggered when the task finishes.
get_state
Returns the current state of the task.
void clear_name()
Resets the task's name to empty.
get_task_chain
Returns the AsyncTaskChain on which this task will be running.
get_max_dt
Returns the maximum amount of time elapsed during any one of the task's previous run cycles,...
get_priority
Returns the task's current priority value.
get_average_dt
Returns the average amount of time elapsed during each of the task's previous run cycles,...
bool has_delay() const
Returns true if a delay has been set for this task via set_delay(), or false otherwise.
get_task_id
Returns a number guaranteed to be unique for each different AsyncTask object in the universe.
get_sort
Returns the task's current sort value.
get_dt
Returns the amount of time elapsed during the task's previous run cycle, in seconds.
is_alive
Returns true if the task is currently active or sleeping on some task chain, meaning that it will be ...
void clear_delay()
Removes any delay specified for the task.
double get_start_time() const
Returns the time at which the task was started, according to the task manager's clock.
void set_delay(double delay)
Specifies the amount of time, in seconds, by which this task will be delayed after it has been added ...
int get_start_frame() const
Returns the frame number at which the task was started, according to the task manager's clock.
double get_delay() const
Returns the delay value that has been set via set_delay, if any.
get_manager
Returns the AsyncTaskManager that this task is active on.