[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [paragui-users] timer object
From: |
Ulf Lorenz |
Subject: |
Re: [paragui-users] timer object |
Date: |
Fri, 22 Jul 2005 12:38:59 +0200 |
User-agent: |
Mutt/1.5.9i |
On Thu, Jul 21, 2005 at 01:48:06PM +0800, address@hidden wrote:
> In my application, I need to create and destroy timer object in
> run time,
> but I found that when I destroy 1 timer object, sometimes others stop
> working, either.
They shouldn't stop sometimes, but always. :)
Basically, this is an SDL problem. Whenever you stop one timer, all
others are removed, too (which reminds me that I once wanted to write a
bug report...). So the solutions that come to my mind are:
1. If the timer is not needed, have it run an idle function, i.e.
void my_timer_function()
{
if (timer_not_active)
return;
...(do the real stuff)
}
2. Restart all other timers when you remove one.
I once had this problem, too. If you want it fixed, please mail the SDL
devel team (it is still on my todo list, but I don't read it
anymore...).
Ulf
--
recursive:
see recursive