123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #ifndef __SIMPLETIMER_H__
- #define __SIMPLETIMER_H__
- #include <e32base.h>
- class MSimpleTimerNotify
- {
- public:
- virtual void TimerExpired( TAny* aTimer,TInt aError ) = 0;
- };
-
- class CSimpleTimer: public CActive
- {
- public:
- static CSimpleTimer* NewL(const TInt aPriority, MSimpleTimerNotify& aNotify);
- ~CSimpleTimer();
- void After(TTimeIntervalMicroSeconds32 aInterval);
-
- protected:
- void RunL();
- void DoCancel();
-
- private:
- CSimpleTimer(const TInt aPriority,MSimpleTimerNotify& aNotify);
- void ConstructL(void);
-
- private:
- RTimer iTimer;
- MSimpleTimerNotify& iNotify;
- };
- #endif
|