20,741
edits
m (→Listeners and Signals: http://flightgear.org/forums/viewtopic.php?f=30&t=19989&p=183776#p183776) |
|||
Line 2: | Line 2: | ||
== Behind the Scenes of Listeners == | == Behind the Scenes of Listeners == | ||
Repeatedly calling getprop() to update a property is called polling. Doing that at frame rate (each time a frame is updated) can become pretty expensive and often isn't necessary, especially for properties that are rarely updated. | |||
Polling is only really recommended for properties that change per frame or really often. Otherwise, you will probably want to use listeners or less-frequent polling using a custom timer. | Polling is only really recommended for properties that change per frame or really often. Otherwise, you will probably want to use listeners or less-frequent polling using a custom timer. |