- From: Jens Meggers <jens.meggers@firepad.com>
- Date: Fri, 28 Jul 2000 10:14:59 -0400 (EDT)
- To: <jose.kahan@w3.org>
- Cc: <www-lib@w3.org>
Jose, when the code is executed at that place it is assumed that the timer is already stopped. Thus, it is better to place the code before the "if" statement. This ensures that a repetitive timer is not stopped after initialised with HTTimer_new(). #ifdef WWW_WIN_ASYNC // on windows we have to stop the timer DeletePlatformTimer(timer); #endif if (timer->repetitive) HTTimer_new(timer, timer->cbf, timer->param, timer->millis, YES, YES); else { HTList_quickRemoveElement(cur, last); } Best Regards, Jens ----- Original Message ----- From: <jose.kahan@w3.org> To: "Jens Meggers" <jens@meggers.com> Cc: <www-lib@w3.org> Sent: Thursday, July 27, 2000 11:35 AM Subject: Re: Bug in HTTimer.c > Hello Jens, > > Good analysis. I don't understand one thing in your patch. Is the #ifdef > related to the else block or is it done systematically, regardless of whether > the timer is repetitive: > > In our previous episode, Jens Meggers said: > > > > > if (timer->repetitive) > > > HTTimer_new(timer, timer->cbf, timer->param, timer->millis, YES, YES); > > > else > > > HTList_quickRemoveElement(cur, last); > > #ifdef WWW_WIN_ASYNC > > // on windows we have to stop the timer > > DeletePlatformTimer(timer); > > #endif > > Or should it be: > > > > if (timer->repetitive) > > > HTTimer_new(timer, timer->cbf, timer->param, timer->millis, YES, YES); > else { > > > HTList_quickRemoveElement(cur, last); > > #ifdef WWW_WIN_ASYNC > > // on windows we have to stop the timer > > DeletePlatformTimer(timer); > > #endif > } > > As soon as I get your answer, I'll try your patch with Amaya and if it works > OK, I'll commit it. > > Thanks, > > -Jose >
Received on Friday, 28 July 2000 10:22:41 UTC