1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
7 * <brain@chatspike.net>
8 * <Craig@chatspike.net>
10 * Written by Craig Edwards, Craig McLure, and others.
11 * This program is free but copyrighted software; see
12 * the file COPYING for details.
14 * ---------------------------------------------------
19 #include "inspircd_config.h"
21 #include <sys/resource.h>
22 #include <sys/types.h>
23 #include <sys/socket.h>
24 #include <netinet/in.h>
34 #include "inspircd_io.h"
35 #include "inspstring.h"
36 #include "helperfuncs.h"
38 extern InspIRCd* ServerInstance;
39 extern ServerConfig* Config;
42 typedef std::vector<InspTimer*> timergroup;
43 typedef std::map<time_t, timergroup*> timerlist;
46 void TickTimers(time_t TIME)
48 timerlist::iterator found = Timers.find(TIME);
50 if (found != Timers.end())
52 timergroup* x = found->second;
54 * There are pending timers to trigger
56 for (timergroup::iterator y = x->begin(); y != x->end(); y++)
58 InspTimer* n = (InspTimer*)*y;
68 void AddTimer(InspTimer* T)
72 timerlist::iterator found = Timers.find(T->GetTimer());
74 if (found != Timers.end())
81 Timers[T->GetTimer()] = x;