Hi Philipp,

>but if bRecursive is always false, then either the event handled always 
>has the ID SALTIMERPROC_RECURSIVE or pSalData->mbInTimerProc is always 
>false. The latter would mean that you don't set it in the handler, while 
>the first would perhaps mean that the third argument of the timer proc 
>has perhaps a slightly different meaning on OS/2 ?

OS/2 handles timers via a window procedure message, so when I get the
WM_TIMER message, I call SalTimerProc; in my case, procedure parameters
are simply cloned from win32 code to make it look similar.

By the way, I found the reason of missing SAL_MSG_POSTTIMER post
messages in WndProc. A real stupid error in Os2SalTimer::start was not
passing nMS to the SAL_MSG_STARTTIMER message.

So pSalData->mnNextTimerTime was always zero :-( and WndProc was not
sending POSTTIMER messages.

BTW can you explain why in ImplSalStartTimer

        pSalData->mnNextTimerTime = pSalData->mnLastEventTime + nMS;

is used? I don't find other references to mnLastEventTime, always zero
for me.

So in win32 WndProcedure, comparing 

                        DWORD nCurTime = GetTickCount();
                        if( pSalData->mnNextTimerTime < nCurTime )
                        {
                        ...
                        ...
                        }

is always true, GetTickCount is a big number compared to timer
timeout...

TIA,


Bye,

        Yuri Dario

/*
 * member of TeamOS/2 - Italy
 * http://www.os2power.com/yuri
 * http://www.teamos2.it
 */

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to