summaryrefslogtreecommitdiff
path: root/include/timer.h
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 /include/timer.h
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 'include/timer.h')
-rw-r--r--include/timer.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/timer.h b/include/timer.h
index ec00abe4f..4d1eee470 100644
--- a/include/timer.h
+++ b/include/timer.h
@@ -54,8 +54,21 @@ class InspTimer : public Extensible
virtual void Tick(time_t TIME) = 0;
};
-void TickTimers(time_t TIME);
-void AddTimer(InspTimer* T);
-void TickMissedTimers(time_t TIME);
+class TimerManager : public Extensible
+{
+ protected:
+
+ typedef std::vector<InspTimer*> timergroup;
+ typedef std::map<time_t, timergroup*> timerlist;
+
+ private:
+
+ timerlist Timers;
+
+ public:
+ void TickTimers(time_t TIME);
+ void AddTimer(InspTimer* T);
+ void TickMissedTimers(time_t TIME);
+};
#endif