On 18-May-99 Alex Robinson wrote:
> OS 2 and OS 1 call SysSleep() directly from the a routine named
> PrvSystemTimerProc() when the device times out. OS 3 enqueues autoOffChr
> at the same logical point in the code. I found that both under the
> emulator and on real devices, I needed to simulate the OS 3 logic under
> OS2 and 1 in order to "trap" auto/timeout power-off.
>
> Can't explain your contrary experience. But then, I also found crashes
> when calling EvtGetEvent() with a timeout other than 0 or -1 under OS V
> 1 (and 2?).
I have an autoOffChr in my PalmOS2 headers. Doesn't that imply that OS2
enqueues autoOffChr as well? I have no idea how their interrupt code works
so I will take your word for it that OS2 & OS3 differ with respect to
autoOffChr.
The EvtGetEvent() doesn't crash with my timeout, and I am getting the
nilEvent regularly (I set it for 30 seconds).. well except that xcopilot
isn't particularly accurate in this respect. I did just try it on an OS2
device and the nilEvent really looks to be accurately happening at 30 second
intervals. Though I do have to keep in mind that the timeout is for *each*
call of EvtGetEvent() and therefore if you have events happening you will not
get a nilEvent until NO event happens during the timeout. So I'll have to
keep that in mind since I have a long 30 second timeout because if a user
taps anything within 30 seconds it will belay the nilEvent, and hence not
update my clock display.
> My experience, also, is that the emulator differs from the devices with
> respect to generating nilEvent's; the emulator generates them in more
> cases than the device.
Well my emulator, xcopilot, is in a bit of a time warp with timeouts. Which
I don't mind because it gives me plenty of time to read through the manual
between nilEvents :)
/* Chris Faherty <[EMAIL PROTECTED]>, finger for PGP */