Time Event structure. More...
|struct QTimeEvtTag *||next|
Time Event structure.
Time events are special QF events equipped with the notion of time passage. The basic usage model of the time events is as follows. An active object allocates one or more QTimeEvt objects (provides the storage for them). When the active object needs to arrange for a timeout, it arms one of its time events to fire either just once (one-shot) or periodically. Each time event times out independently from the others, so a QF application can make multiple parallel timeout requests (from the same or different active objects). When QF detects that the appropriate moment has arrived, it inserts the time event directly into the recipient's event queue. The recipient then processes the time event just like any other event.
Time events, as any other QF events derive from the QEvt base structure. Typically, you will use a time event as-is, but you can also further derive more specialized time events from it by adding some more data members and/or specialized functions that operate on the specialized time events.
Internally, the armed time events are organized into a bi-directional linked list. This linked list is scanned in every invocation of the QF_tick() function. Only armed (timing out) time events are in the list, so only armed time events consume CPU cycles.
the interval for the periodic time event (zero for the one-shot time event). The value of the interval is re-loaded to the internal down-counter when the time event expires, so that the time event keeps timing out periodically.
|struct QTimeEvtTag* QTimeEvt::next|