⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timermanager.h

📁 对POSIX timer的面向对象的封装。
💻 H
字号:
#ifndef TIMER_MANAGER_H#define TIMER_MANAGER_H#include <map>#include <time.h>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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -