Dear Robert Moynihan, Thanks for your indication very much. I have followed your way and learned how to apply notifications to keep track on the required timing information.
I have read the on-line programming recipe on PalmSource (also see the link below) and get the job done. Many thanks indeed. http://www.palmos.com/dev/support/docs/recipes/notifications.html Regards, Stephen H.S. Lee -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Moynihan Sent: Wednesday, November 17, 2004 9:43 PM To: Palm Developer Forum Subject: Re: PowerOn Timer 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/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
