Ben,
Thanks for the information. The sleep notification seems like a good idea,
since the user can't change the clock while the palm is asleep. However,
can the app deal with the sleep notification even if the users are running
another application when the palm goes to sleep? For example, say the user
types a code into my app and then goes and uses something else, such as the
calculator. The palm then goes to sleep and 15 minutes later, the user
brings it back to full on mode and runs my app to see whether new
information is available yet. Can my app know that the palm was asleep for
15 minutes while running the calculator app, so that it can add 15 minutes
to the time elapsed since the entering of the code? I guess I'm not sure
how the sleep notifications work. Any info would be greatly appreciated.
Thanks,
Martin
On Mon, 24 Sep 2001 01:54:21 -0500, Palm Developer Forum wrote:
> "Martin Reinfried" <[EMAIL PROTECTED]> wrote in message
> news:63149@palm-dev-forum...
> >
> > Is there an unchangeable (other than by hard reset) internal clock
> that an
> > application can make use of in order to allow dispersal of information
> a
> > certain amount of time after the user performs an action? I am
> interested
> > in writing an app where the user would enter a code, and some amount
> of time
> > later (say 30 minutes), a piece of information would become available.
> If I
> > just look at the time set by the user, then clearly, the user could
> just
> > change the time to 30 minutes later to make the information available
> > instantly. Is there perhaps an accessible clock that just gives
> seconds
> > since the last reset? If so, there would be no way for the user to
> speed up
> > delivery of the information (they could slow it down by performing a
> reset,
> > but that can be dealt with). I would appreciate any information.
> Thanks,
>
> The system ticks count is a monotonically increasing value that could be
> used for this purpose. You can convert ticks to seconds by dividing by
> the value returned by SysGetTicksPerSecond. You can get the current
> tick count via TimGetTicks.
>
> Ticks don't go up when the device is in sleep mode -- that will be a
> problem. You could use the sleep and wake notifications on Palm OS 3.5
> and later to catch that and adjust your calculations using the
> differences in the realtime clock.
>
> Note: this count does get reset by any reset, not just a hard reset, but
> its the best thing available on the Palm. Also, the tick count will
> overflow after about 497 days on most Palm OS devices, so its possible
> that
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
_______________________________________________________
Send a cool gift with your E-Card
http://www.bluemountain.com/giftcenter/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/