Timer
A simple usage example would be a simple situation in which you wanted to move an object from one place to another smoothly over a period of time. The code to perform that is as follows:
[Timer
Object:MyObject Data:&MyObject->posx Destination:5.0
Method:@selector(linear:) Time:3.0 Flags:0];
Timers are structures that act on data and execute callbacks based on time. They have high precision and some retroactive capabilities. The server maintains them and they are associated with both the object that they are acting on and the callback object if they are present (meaning that if either of them are deallocated then the Timer is as well). Timer maintenance and evaluation happens once every server event loop. To create a Timer you send a message to the Timer class with specific parameters:
Object is an object that you specify that this Timer is associated with for purposes of deallocation and such(if the Data:Destination:Method: parameters are present then it is almost always going to be the object that the "data" member that the Data: parameter is pointing to belongs to). Typically Timers deallocate upon their completion but some types of Timers can keep going and avoid expiration. Data, Destination and Method must all be present if any are. They represent a pointer to data that should be modified over the lifespan of this Timer, what value it should be at the end and what computation function should be used to get it there. Start is a value that the data variable is set to on the initial creation of the Timer. Timer is the amount of time in seconds that this Timer will exist or how long between events if it does not expire. CallbackObject and Callback are the parameters that dictate the object and routine to be executed when the Timer completes. Flags is a bit field in which various Timer settings are passed in in OR'ed form.