mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 04:58:21 +00:00
Make TimerMgr an IOSource
- This allows the loop to check what the next timeout is and use that as the basis for the timeout of the poll - This commit also removes the TimerMgr::Tag type, since it causes a name clash with other code in IOSource
This commit is contained in:
parent
4fa3e4b9b4
commit
92bde61b78
7 changed files with 101 additions and 39 deletions
|
@ -104,7 +104,7 @@ public:
|
|||
// Looks up timer manager associated with tag. If tag is unknown and
|
||||
// "create" is true, creates new timer manager and stores it. Returns
|
||||
// global timer manager if tag is nil.
|
||||
TimerMgr* LookupTimerMgr(const TimerMgr::Tag* tag, bool create = true);
|
||||
TimerMgr* LookupTimerMgr(const std::string* tag, bool create = true);
|
||||
|
||||
void ExpireTimerMgrs();
|
||||
|
||||
|
@ -245,8 +245,8 @@ protected:
|
|||
PacketProfiler* pkt_profiler;
|
||||
|
||||
// We may use independent timer managers for different sets of related
|
||||
// activity. The managers are identified by an unique tag.
|
||||
typedef std::map<TimerMgr::Tag, TimerMgr*> TimerMgrMap;
|
||||
// activity. The managers are identified by a unique tag.
|
||||
typedef std::map<std::string, TimerMgr*> TimerMgrMap;
|
||||
TimerMgrMap timer_mgrs;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue