On Wed, 04 Jun 2003 12:33:30 -0500 "Curtis L. Olson" <[EMAIL PROTECTED]> wrote:
> Norman Vine writes: > > > Are you sure that's true? > > > > Yes ! > > > > > The event queue still needs to check every > > > event every iteration to see if anything is ready to run ... > > > > Not if the event queue is ordered by next run time ! > > > > All you have todo is process those items whose time stamp > > is less then when the queue traversal began and be sure that the > > queue remains ordered. > > What you describe would be an interesting/good way to impliment an > event queue, but I believe the FlightGear event queue updates the time > for each item, and then finds the one that is most ready to run (in > other words, finds the most overdue event of all the runable events) > and runs it. I believe Curt is correct re the current implementation; events are stored unordered and a sweep of the entire event queue is made per update. IIRC an earlier version was implemented like Norman's suggestion - events were prioritized according to time and only the item at the head of the queue needed to be checked each update. If greater use of events is required then the prioritized scheme would be preferable. Bernie _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
