17 INLINE AsyncTask::State AsyncTask::
29 INLINE
bool AsyncTask::
40 case S_servicing_removed:
113 nassertr(_state != S_inactive, 0.0);
125 nassertr(_state != S_inactive, 0);
134 set_name(std::string());
141 INLINE AtomicAdjust::Integer AsyncTask::
142 get_task_id()
const {
150 INLINE
const std::string &AsyncTask::
151 get_task_chain()
const {
159 INLINE
int AsyncTask::
167 INLINE
int AsyncTask::
168 get_priority()
const {
180 nassertv(_state == S_inactive);
181 _done_event = done_event;
188 INLINE
double AsyncTask::
197 INLINE
double AsyncTask::
206 INLINE
double AsyncTask::
207 get_average_dt()
const {
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...
bool has_delay() const
Returns true if a delay has been set for this task via set_delay(), or false otherwise.
set_done_event
Sets the event name that will be triggered when the task finishes.
void clear_name()
Resets the task's name to empty.
int get_start_frame() const
Returns the frame number at which the task was started, according to the task manager's clock.
double get_start_time() const
Returns the time at which the task was started, according to the task manager's clock.
void clear_delay()
Removes any delay specified for the task.
void set_delay(double delay)
Specifies the amount of time, in seconds, by which this task will be delayed after it has been added ...
double get_delay() const
Returns the delay value that has been set via set_delay, if any.