|
|
|
Location:
e32std.h
Link against: euser.lib
RTimer
Supported from 5.0
Asynchronous timer services.
Four types of asynchronous request are supported by the class:
Requesting an event after a specified interval
Requesting an event at a specified system time
Requesting a timer event on a specific second fraction
Requesting an event if an interval elapses with no user activity. Note that this feature is not available in v5.
Each of these requests can be cancelled.
The timer exists from its creation following a call to
RTimer::CreateLocal() until it is destroyed by a call to the
Close() member function of the base class
RHandleBase.
Note that the CTimer active object uses an
RTimer.
|
Defined in RTimer:
After(), At(), Cancel(), CreateLocal(), Inactivity(), Lock()
Inherited from RHandleBase:
Close(),
Duplicate(),
Handle(),
SetHandle()
TInt CreateLocal();
Creates a thread-relative timer.
|
void After(TRequestStatus& aStatus,TTimeIntervalMicroSeconds32 anInterval);
Requests an event after the specified interval.
The counter for this type of request stops during power-down. A 5 second timer will complete late if, for example, the machine is turned off 2 seconds after the request is made.
If this function is called while a request for a timer event is still outstanding, then it raises a KERN-EXEC 15 panic.
|
void At(TRequestStatus& aStatus,const TTime& aTime);
Requests an event at a given system time. If the machine is off at that time, it is automatically turned on.
If this function is called while a request for a timer event is still outstanding, then it raises a KERN-EXEC 15 panic.
|
void Lock(TRequestStatus& aStatus,TTimerLockSpec aLock);
Requests an event on a specified second fraction.
If this function is called while a request for a timer event is still outstanding, then it raises a KERN-EXEC 15 panic.
|
void Inactivity(TRequestStatus& aStatus, TTimeIntervalSeconds aSeconds);
Supported from 6.0
Requests an event if the specified time interval elapses without user actvity.
If there has already been a period of user inactivity greater than the specified inteval, then the timer is set after the next user activity.
If this function is called while a request for a timer event is still outstanding, then it raises a KERN-EXEC 15 panic.
|
void Cancel();
Cancels any outstanding request for a timer event.
Any outstanding timer event completes with
KErrCancel.