本帖最后由 程浥 于 2016-4-30 09:30 编辑  
 
 
实现核心: 
[AppleScript] syntaxhighlighter_viewsource syntaxhighlighter_copycode 	enum TIMEINDEXLIMIT
	{
		SOFT_TIMER_MAX = 16
	};
	
	typedef struct
	{
		CCommonTimer::TimeRep   start_time;		    //起始时间
		u32 					timeout;			//timeout时间---定时器间隔
		bool 					enable;                 //timer使能---只控制定时启停,不对资源操作
		bool 					reinstall;               //重复使能有效---运行一次,还是自动重载
		bool                                count_ok;             //计数时间到---调用“中断函数handle”
		LPETIMECALLBACK 		handle; 			//函数指针---“中断函数”的指针
		u16            			index;       		//序号---软定时号  0-15
		bool           			valid_enable;    	//是否有效---管理定时器资源
		u32                                  tick;                      //tick计时----定时器计数值  (tick>timeout)--->count_ok
	}SOFT_TIMER_t; 
 |