Make 'timestamps' for all your timers. For instance if you want a timer to occur in a second of time, it's timestamp needs to be TimGetTicks() + SysTicksPerSecond(). Safe the timestamps in a sorted datastructure.
Now if a Nil event occurs, compare the current time (TimGetTicks()). If it's greater than or equal to the smallest TimeStamp. Handle the associated code and initiate a Nil event for the next event (Timestamp). And Bob's your uncle. Apparently. Good luck, Caspar -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ali Rafiee Sent: Wednesday, March 24, 2004 12:13 AM To: Palm Developer Forum Subject: Multiple Timers I have read all the suggestions on how to implement a timer using the event loop and the EvtGetEvent function. That is nice if you want to have one timer. I need to have three or four timers at the same time, lets say one should triger at 7.3 seconds, and one at 9.2, and the last at 10.5 seconds. How would you guys do this? Thanks for the suggestions Ali __________________________________ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
