Bruce Momjian <[EMAIL PROTECTED]> writes:
!                               /* WaitForSingleObjectEx() uses milliseconds */
> !                             waittime = timerCommArea.value.it_value.tv_usec 
> / 1000 + timerCommArea.value.it_value.tv_sec * 1000;

Seems like this probably ought to round up not down:

        waittime = (timerCommArea.value.it_value.tv_usec + 999) / 1000 + 
timerCommArea.value.it_value.tv_sec * 1000;

Otherwise, an attempt to wait for 100 usec would convert to waittime 0,
which seems like a bad thing.  In general the semantics of timed waits
are always supposed to be "you wait at least this long".

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to