Timers
Sean Adams <[email protected]>
| Newsgroups | gmane.music.equipment.slimp3.dev |
|---|---|
| Message-ID | <[email protected]> |
> Now that this is working well, I need to figure out how the timer > routines work. Basically, I need to have a timer count down from a > given value to zero, and call a routine when zero has been hit. This > will be used to update the artist/title display on the device while > playing live365 streams. We're not using timers correctly right now, and I think there may be some bugs in my code when handling multiple clients. This area definitely needs some work. Here's how I envisioned the timer mechanism: For a simple one-shot timer, eg "display this for 5 seconds, then revert to the previous display", you would set the timer and then if you wanted to cancel it, you would call some "clear timer" function. We could identify the timer to clear by its function pointer, but it would probably be better to assign each timer a unique ID number. If you want a periodic timer (eg blinking pause) you set the timer once to start it going, and then each time the timer fires, it sets itself again. Sean ------------------------ Yahoo! Groups Sponsor ---------------------~--> Pinpoint the right security solution for your company- Learn how to add 128- bit encryption and to authenticate your web site with VeriSign's FREE guide! http://us.click.yahoo.com/yQix2C/33_CAA/yigFAA/rIp0lB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/