|
|
class ITimerService
{
public:
virtual bool OnTimer(int nEventID, int Delay) = 0;
};
class ITimer
{
public:
virtual void SetTimer(int nEventID, int Delay, ITimerService* pService) = 0;
virtual void KillTimer(int nEventID) = 0;
};
用法很简单, 参看TestTimer.cpp |
|