+void SGEventMgr::removeTask(const std::string& name)
+{
+ SGTimer* t = _simQueue.findByName(name);
+ if (t) {
+ _simQueue.remove(t);
+ } else if ((t = _rtQueue.findByName(name))) {
+ _rtQueue.remove(t);
+ } else {
+ SG_LOG(SG_GENERAL, SG_WARN, "removeTask: no task found with name:" << name);
+ return;
+ }
+ if (t->running) {
+ // mark as not repeating so that the SGTimerQueue::update()
+ // will clean it up
+ t->repeat = false;
+ } else {
+ delete t;
+ }
+}
+