"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/

Reply via email to