From: mtk Date: Mon, 9 May 2011 15:46:52 +0000 (+0000) Subject: added a clear() method to the TimerEventProxy to allow the removal of all pending... X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=1081c75b5564fda3eef4918bf137a76fe62fe9ae;p=senf.git added a clear() method to the TimerEventProxy to allow the removal of all pending/actiive timers git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1786 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Scheduler/TimerEventProxy.ct b/senf/Scheduler/TimerEventProxy.ct index c9a58f6..0caaf20 100644 --- a/senf/Scheduler/TimerEventProxy.ct +++ b/senf/Scheduler/TimerEventProxy.ct @@ -109,7 +109,13 @@ template prefix_ unsigned senf::scheduler::TimerEventProxy::numEvents() const { - return entrySetByTimeout.size(); + return entrySetByTimeout.size(); +} + +template +prefix_ void senf::scheduler::TimerEventProxy::clear() +{ + entrySetByTimeout.clear(); } //-///////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/senf/Scheduler/TimerEventProxy.hh b/senf/Scheduler/TimerEventProxy.hh index c7ec857..651a6b9 100644 --- a/senf/Scheduler/TimerEventProxy.hh +++ b/senf/Scheduler/TimerEventProxy.hh @@ -71,6 +71,8 @@ namespace scheduler { /**< if no timer for this id is registered \a 0 is returned. */ unsigned numEvents() const; ///< Returns the number of pending timer events + + void clear(); ///< Clears all pending timer events private: #ifndef DOXYGEN