|
||
class CDeltaTimer : public CActive;
A queue of timed events.
A timed event is a callback function encapsulated by a TDeltaTimerEntry
object, and is intended to be called when the time interval represented by the event expires.
The queue itself is a TDeltaQue
list. A timed event entry is added into a position in the queue that is determined by the time interval specified for that
event. Although the time interval for a timed event is specified as an interval from the present moment, when added to the
queue the implementation treats each event as having an interval from the previous timed event (or now).
CDeltaTimer is an active object, driven by an RTimer
which is usually set to expire upon completion of the event at the head of the queue. If the time to the next event is too
great or an event at the head of the queue has been removed, the timer may be set to expire prior to the event at the head
of the queue (if any).
When the timer completes, the head of the queue is inspected to see whether the timed event at the head of the queue has expired. On expiry, the callback function represented by that timed event is called, and the timed event entry is removed from the queue. The queue then inspects further events for expiry, calling and removing them as necessary until either the queue is empty or there is an event in the future to wait for.
Note that the tick period is the minimum time interval for an event and the granularity of all timings using the queue. Note that in general, any event may be called back some time after it has expired and that specifically the duration of all events will at least be rounded up to a muliple of the tick period.
CBase
-
Base class for all classes to be instantiated on the heap.
CActive
-
The core class of the active object abstraction.
CDeltaTimer
- A queue of timed events.
Defined in CDeltaTimer
:
NewL(TInt)
Creates a new timed event queue with the specified active object priority.NewL(TInt,TTimeIntervalMicroSeconds32)
Creates a new timed event queue with the specified active object priority, and t...Queue(TTimeIntervalMicroSeconds32,TDeltaTimerEntry &)
Adds a new timed event entry into the timed event queue.QueueLong(TTimeIntervalMicroSeconds,TDeltaTimerEntry &)
Adds a new timed event entry into the timed event queue.Remove(TDeltaTimerEntry &)
Removes the specified timed event entry from the timer queue.Inherited from CActive
:
CActive(TInt)
Constructs the active object with the specified priority.Cancel()
Cancels the wait for completion of an outstanding request.Deque()
Removes the active object from the active scheduler's list of active objects.DoCancel()
Implements cancellation of an outstanding request.EPriorityHigh
A priority higher than EPriorityUserInput.EPriorityIdle
A low priority, useful for active objects representing background processing.EPriorityLow
A priority higher than EPriorityIdle but lower than EPriorityStandard.EPriorityStandard
Most active objects will have this priority.EPriorityUserInput
A priority higher than EPriorityStandard; useful for active objects handling use...Extension_(TUint,TAny *&,TAny *)
Extension function IsActive()const
Determines whether the active object has a request outstanding.IsAdded()const
Determines whether the active object has been added to the active scheduler's li...Priority()const
Gets the priority of the active object.RunError(TInt)
Handles a leave occurring in the request completion event handler CActive::RunL(...RunL()
Handles an active object's request completion event.SetActive()
Indicates that the active object has issued a request and that it is now outstan...SetPriority(TInt)
Sets the priority of the active object.TPriority
Defines standard priorities for active objects. iStatus
The request status associated with an asynchronous request.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...TDeltaTimerEntry
A timed event entry.TDeltaQue
A templated class that provides the behaviour for managing a doubly linked list ...IMPORT_C static CDeltaTimer* NewL(TInt aPriority);
Creates a new timed event queue with the specified active object priority.
|
|
Interface status: | deprecated |
IMPORT_C static CDeltaTimer* NewL(TInt aPriority, TTimeIntervalMicroSeconds32 aGranularity);
Creates a new timed event queue with the specified active object priority, and the specified timer granularity.
|
|
IMPORT_C virtual void Queue(TTimeIntervalMicroSeconds32 aTimeInMicroSeconds, TDeltaTimerEntry &aEntry);
Adds a new timed event entry into the timed event queue.
|
IMPORT_C virtual void Remove(TDeltaTimerEntry &aEntry);
Removes the specified timed event entry from the timer queue.
|
IMPORT_C TInt QueueLong(TTimeIntervalMicroSeconds aTimeInMicroSeconds, TDeltaTimerEntry &aEntry);
Adds a new timed event entry into the timed event queue.
|
|