diff options
Diffstat (limited to 'src/modulemanager.cpp')
-rw-r--r-- | src/modulemanager.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index 24e334e65..ec8bf35d3 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -445,3 +445,21 @@ bool ModuleManager::SetPriority(Module* mod, Implementation i, Priority s, Modul return true; } + +/** Delete all timers attached to a module + * @param m The module + */ +void ModuleManager::ClearTimers(Module *m) +{ + std::list<Timer *>::iterator it; + Timer *t2; + + for (it = m->CallBacks.begin(); it != m->CallBacks.end(); ++it) + { + t2 = *it; + + TimerManager::DelTimer(t2); + } + + m->CallBacks.clear(); +} |