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

📄 timer.h

📁 AODV
💻 H
字号:
/************************************************************************			       ---AODV-UIUC---			       This software can be used under GNU General Public License.Author: Binita Gupta <binita@uiuc.edu>	University of Illinois, Urbana-Champaign************************************************************************/#ifndef TIMER_H#define TIMER_Htypedef void (*timer_hfunc_t) (void *);class timer{	u_int64_t		timeout;	//struct timeval	timeout;	timer_hfunc_t		handler;	void			*data;	public:	timer() {}	timer(u_int64_t timer_val, timer_hfunc_t handler_ptr, void *func_data)	{		timeout = timer_val;		handler = handler_ptr;		data = func_data;	}	void *	getData() { return data; }		friend bool operator< (const timer &t1, const timer &t2);	friend bool operator<= (const timer &t1, const timer &t2);	friend bool operator> (const timer &t1, const timer &t2);	friend bool operator>= (const timer &t1, const timer &t2); 	friend bool operator== (const timer &t1, const timer &t2);	friend bool operator!= (const timer &t1, const timer &t2);	friend class timerQueue;};#endif

⌨️ 快捷键说明

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