timermanager.h

来自「对posix timer面向对象的封装。 进程内部每一个timer都可以拥」· C头文件 代码 · 共 34 行

H
34
字号
#ifndef TIMER_MANAGER_H#define TIMER_MANAGER_H#include <map>#include <time.h>#define SIGMYTIMER (SIGRTMAX)class ITimer;class TimerCache;class TimerManager{typedef std::map<timer_t , int> TimerIdMap;public:  TimerManager();  virtual ~TimerManager();  int initialize(TimerCache * pCache);  // create and start the timer  timer_t createTimer(ITimer * timer , int interval , bool periodical = false , void * args = 0);  // cancel the timer.  int deleteTimer(timer_t timerId);protected:  // the pointer to the timer cache.  TimerCache * pCache_m;  // timer id map <timer_t to int>  TimerIdMap idMap_m;};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?