PalmOS provides no support for measuring time more accurately than the 100th
of a second tick clock. However, if you're willing to talk to the hardware
(and live with maintaining the code as CPU changes are made), then you can
get much more precise timing from the Dragonball timers. Don't do this
unless you really need to!
My memory is a bit sketchy on this stuff, but I did get precise timing to
work on the original Dragonball. It had two timers, and the operating system
had them set up for the tick clock. Without making any changes to the way
they work (which would really mess things up for the OS!), I found that
reading them could give a very precise timer. I just read the Dragonball
manual available on the Motorola web site and looked to see how the timers
were set up by the OS. If I recall, one timer incremented every 3 clock
cycles, and wrapped after some count, upon which it incremented the other
timer. This timer also wrapped after some count, and when it did, it
incremented the tick clock. The tricky bit is that when you read the timers,
you have to pick an order, and they're running while you read them, so you
can't get a value for both timers at the same instant in time. I think I did
a test and just re-read the timers when necessary. By combining the results,
I had a timer that incremented every 3 clock cycles, which is far more
precise than you need.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html