You would probably want to use the notifications to track this. Your
application would need to respond to both the wakeup and sleep
notifications, finding the TimGetSeconds() (or ticks, if you really need
that resolution) for each, and store the subtraction in a database
somewhere so that the "On" time could be retrieved at a later date. Bob.
Stephen H.S. Lee wrote:
Dear developers,
How can I get the information about the time past since the device is powered
on?
For example, I turn on the Palm device and use Contacts for 5 minutes and then
Date Book for 7 minutes. After that a little application can tell me I have
spent 12 minutes totally.
If there is a function call that similar to TimGetTicks(), instead of return
the tick count since the last reset, but return the tick count since the last
power on, will serve the purpose.
Any advices to fulfill this programming needs?
Thanks for any help in advance.
Best regards,
Stephen H.S. Lee
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/