summaryrefslogtreecommitdiff
path: root/include/timers.h
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-03-20 19:23:32 +0100
committerattilamolnar <attilamolnar@hush.com>2013-03-20 19:42:50 +0100
commitd5a453b6638be81e4a69269e86bd508476305f14 (patch)
tree7693f5a24af69c738181ff42f27a8dd2a9426490 /include/timers.h
parent731912f01eb14d811575c492dc64b60084bd412c (diff)
Improve TimerManager
Instead of adding timers into a vector and sorting them every time a timer is added, use a multimap
Diffstat (limited to 'include/timers.h')
-rw-r--r--include/timers.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/timers.h b/include/timers.h
index 49490b09d..229333596 100644
--- a/include/timers.h
+++ b/include/timers.h
@@ -90,7 +90,7 @@ class CoreExport TimerManager
{
/** A list of timers
*/
- static std::vector<Timer *> Timers;
+ static std::multimap<time_t, Timer *> Timers;
public:
/** Add a timer to the list
* @param t A Timer derived class to add
@@ -106,10 +106,6 @@ class CoreExport TimerManager
* @param ctime The current time
*/
static void TickTimers(time_t ctime = Anope::CurTime);
-
- /** Compares two timers
- */
- static bool TimerComparison(Timer *one, Timer *two);
};
#endif // TIMERS_H