summaryrefslogtreecommitdiff
path: root/src/timer.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 00:02:31 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 00:02:31 +0000
commitad3c37e38c6c170c1f7cc3232db748ebdc62aa94 (patch)
tree4b59a16e8bbd2241a4b49c953c089a9180e4a43c /src/timer.cpp
parentf5872557eb0eee0f71f16ad39d693024f4cf8b1f (diff)
Relocate timer stuff into TimerManager class
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4827 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/timer.cpp')
-rw-r--r--src/timer.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/timer.cpp b/src/timer.cpp
index f35a9c67b..2b30b478c 100644
--- a/src/timer.cpp
+++ b/src/timer.cpp
@@ -22,12 +22,7 @@
#include "helperfuncs.h"
#include "timer.h"
-typedef std::vector<InspTimer*> timergroup;
-typedef std::map<time_t, timergroup*> timerlist;
-
-timerlist Timers;
-
-void TickTimers(time_t TIME)
+void TimerManager::TickTimers(time_t TIME)
{
timerlist::iterator found = Timers.find(TIME);
@@ -57,7 +52,7 @@ void TickTimers(time_t TIME)
* If you move your clock BACK, and your timers move further ahead as a result,
* then tough titty you'll just have to wait.
*/
-void TickMissedTimers(time_t TIME)
+void TimerManager::TickMissedTimers(time_t TIME)
{
for (time_t n = TIME-1; n > TIME-120; n--)
{
@@ -78,7 +73,7 @@ void TickMissedTimers(time_t TIME)
}
}
-void AddTimer(InspTimer* T)
+void TimerManager::AddTimer(InspTimer* T)
{
timergroup* x = NULL;
@@ -96,3 +91,4 @@ void AddTimer(InspTimer* T)
x->push_back(T);
}
+