"Ben Combee" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > At 03:07 PM 6/6/2004, you wrote: > >I developed a stopwatch application for my Palm IIIx and it keeps > >perfect time. I bought a new Zire 21 and when I use the same application > >it loses 1 second every 10 minutes! I am using the TimGetTicks api call. > >Do I have to rebuild the application with newer runtime libraries? I > >can't find any info on palm websites. Could the Zire be defective? > > My guess is that the Zire 21 is defective; the API is the same. The number > of ticks per second is the same. You've just got a device with a less > precise clock.
Actually your Zire 21 is not defective, it will show the same thing on all omap OS 5 devices. This is because of how the tick count is implemented, using the 32 kHz, or rather 32.768 kHz, oscillator. The OS tick count is incremented each time a certain hardware register reaches zero. It is then reset to 327 and starts counting down to zero again, and so on. When using TimGetTicks on am omap device 100 ticks will actually be slightly less than one second, to be more exact 100 ticks is 327/327.68 = 0.9979248 seconds. 10 minutes equals 600 seconds which on the omap devices is 600 * 327 / 327.68 = 598.75488 'real' seconds. This explains your missing second, or rather 1.25 seconds. :) Jonatan www.clievideo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
