SDL_Timer

Ok, so I use SDL_Timer to do something after a certain period of time. How
could I set it up so that a timer runs only once and during that period of
running time, it has to do something specific. Like for instance I have an
image I want only to display for 5 seconds after the user hit the enter
key. How would I be able to do that? Is there a way to set the timer up to
only run once and a way to check to see if it is still running?

-Jamie

The easiest way to use timers is by using a flag (part of the data
you send the SDL_AddTimer() function, which it passes on to your callback)
or simply use an event.

See the example I added to the Wiki a few weeks ago:

http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fAddTimer

-bill!
bill at newbreedsoftware.com Tonight’s Forecast: Dark. Continued darkness
http://newbreedsoftware.com/ until widely scattered light in the morning.On Tue, May 03, 2005 at 07:26:36PM -0400, Jamie Bernier wrote:

Ok, so I use SDL_Timer to do something after a certain period of time. How
could I set it up so that a timer runs only once and during that period of
running time, it has to do something specific. Like for instance I have an
image I want only to display for 5 seconds after the user hit the enter
key. How would I be able to do that? Is there a way to set the timer up to
only run once and a way to check to see if it is still running?