paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [paragui-users] timer object


From: Alexander Pipelka
Subject: Re: [paragui-users] timer object
Date: 29 May 2002 15:37:34 +0200

Am Mit, 2002-05-29 um 15.08 schrieb Keith Swyer:
> yep, you're right, there is only one timer. I have just looked a little
> closer at this function and sdl_delay.....no need. not sure what i was
> thinking there, i guess it's just cuz i saw it in the sample. but also, the
> sdl_settimer uses the mac time manager that i was looking at trying to use.
> guess i should have looked a little closer earlier. but then again, the
> function calls used would have ment nothing unless i knew about the time
> manager anyway....
> 
> alright....it should work. my only other thought/question is that why to
> differnet timer functions in sdl?? don't they do the same thing then?? well
> i guess you can't pass parameters to sdl_settimer. it's probably a good idea
> to try and set up sdl_addtimer anyway. let me know if you look at making
> that change in the timerobject or not.....perhaps it might be better until i
> get the addtimer working??? what do you think would be a better idea/??
> leave it until i make changes, or use the sdl_settimer?

Ok. I added the single timer.

I added the following methods to PG_TimerObject

SetTimer(Uint32 interval);
StopTimer();

Uint32 eventTimer(Uint32 interval);

Please note the different event handlers for single and multiple timers:

Uint32 eventTimer(PG_TimerID id, Uint32 interval); << MULTIPLE
Uint32 eventTimer(Uint32 interval); << SINGLE

If you get SDL_AddTimer (multiple timers) working you can easily switch.

Hope this helps

Alex






reply via email to

[Prev in Thread] Current Thread [Next in Thread]