Skip to content

Commit

Permalink
Scripting|Scheduler: Added a method for checking if a scheduler has f…
Browse files Browse the repository at this point in the history
…inished
  • Loading branch information
skyjake committed Oct 30, 2015
1 parent cd9e8f1 commit 40de768
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doomsday/sdk/libcore/include/de/scriptsys/scheduler.h
Expand Up @@ -90,6 +90,12 @@ class DENG2_PUBLIC Scheduler
*/
void advanceTime(TimeDelta const &elapsed);

/**
* Checks if there are no more scheduled sheduler is out of scheduled scripts.
* @return
*/
bool isFinished() const;

private:
DENG2_PRIVATE(d)
};
Expand Down
5 changes: 5 additions & 0 deletions doomsday/sdk/libcore/src/scriptsys/scheduler.cpp
Expand Up @@ -196,4 +196,9 @@ void Scheduler::Clock::advanceTime(TimeDelta const &elapsed)
d->advanceTime(elapsed);
}

bool Scheduler::Clock::isFinished() const
{
return d->events.empty();
}

} // namespace de

0 comments on commit 40de768

Please sign in to comment.