What? No one found the problem? So much for peer code reviews.... :-)
Steve Lemke provided me the hint. The problem is with
"sysTicksPerSecond". This is defined to be 100 when building a Palm
OS ROM, but 1000 when building Windows applications (and 60 when
building Macintosh applications). So there's your factor of 10...
I'm pretty sure I can fix this for Poser 3.5.
-- Keith Rollin
-- Palm OS Emulator engineer
At 2:03 PM -0800 2/18/02, Keith Rollin wrote:
>At 11:11 AM -0500 2/18/02, Matt Hebley wrote:
>>In my code, I set the timeout to 20 seconds which appears to be the
>>case on a real device (I haven't actually set up a scenario that
>>will take forever and timed the timeout). With POSE the same code
>>often times out on the host stack in what I estimate to be 2
>>seconds (definitely way less than 20 seconds), but doesn't seem to
>>do the same using the NetLib stack.
>
>Perhaps there's a problem with the way I convert ticks to
>microseconds? Here's my code:
>
> // Convert ticks to microseconds.
>
> hostTimeout.tv_sec = timeout / sysTicksPerSecond;
> hostTimeout.tv_usec = (timeout % sysTicksPerSecond) *
>(1000000 / sysTicksPerSecond);
> hTp = &hostTimeout;
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/tech/support/forums/