|
Home > Archive > SQL Anywhere ultralite > January 2006 > Time Synchronization with Ultralite Palm
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Time Synchronization with Ultralite Palm
|
|
| Alexey Panshin 2006-01-10, 7:23 am |
| Hi
I have ultralite application running on palm handheld.
Is it possible to synchronize handheld time with pc time during hotsync in
my application without using third party applications (TimeCopy, etc.)?
With best regards, Alexey.
| |
| Greg Fenton 2006-01-10, 9:23 am |
| Alexey Panshin wrote:
> I have ultralite application running on palm handheld.
> Is it possible to synchronize handheld time with pc time during hotsync in
> my application without using third party applications (TimeCopy, etc.)?
>
There are no features for this built into UltraLite/MobiLink. In the
early days of Palm/UL/ML, I used to build in a type of time
synchronization with my database synchronization (download the current
time from the consolidated and estimate the delay from capture of that
timestamp to reception on the remote), but it was a hack. It was fine
if all you were really looking for was to keep the clocks within a few
minutes of each other.
In fact, I suspect it could be within a second or two if done within its
own publication. But realize that this approach does not come anywhere
near as precise as one gets with a proper time synchronization protocol
such as NTP (http://www.ntp.org/).
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
| |
| Alexey Panshin 2006-01-11, 3:23 am |
|
Greg Fenton wrote:
> Alexey Panshin wrote:
in[color=darkred]
>
> There are no features for this built into UltraLite/MobiLink. In the
> early days of Palm/UL/ML, I used to build in a type of time
> synchronization with my database synchronization (download the current
> time from the consolidated and estimate the delay from capture of that
> timestamp to reception on the remote), but it was a hack. It was fine
> if all you were really looking for was to keep the clocks within a few
> minutes of each other.
>
> In fact, I suspect it could be within a second or two if done within its
> own publication. But realize that this approach does not come anywhere
> near as precise as one gets with a proper time synchronization protocol
> such as NTP (http://www.ntp.org/).
>
Yes i want to keep clocks within a few minutes of each other. It seems to me
that the only way to get time from PC in ultralite program is download time
as record in some ultralite table. But when i write code to open ultralite
database when notification sysAppLaunchCmdSyncN
otify occurs my program
crashes. Is it possible to open ultralite database when
sysAppLaunchCmdSyncN
otify occurs?
(ASA 9.0.2.3221)
With best regards , Alexey
| |
| Usmanov A. 2006-01-13, 7:23 am |
| Hi.
The best way - create simple application (e.g. it will show last sync time)
and conduit for this app for set time in your palm via sync. Using Conduit
Wizard for VC++ 7 you can create such conduit for 30 minutes (with test).
This is code : :))
//sync time in conduit
time_t t;
t = time( NULL );
SyncWriteSysDateTime
( t );
In future you can add in your app timezone control, sntp-client or whatever
one likes.
--
Sincerely yours,
Alex Usmanov
e-mail: msap@center.magnat-trade.ru
"Alexey Panshin" <lesha@unact.ru> сообщил/сообщила в новостях следующее:
news:43c4b68d@forums
-1-dub...
>
> Greg Fenton wrote:
hotsync[color=darkre
d]
> in
etc.)?[color=darkred]
>
> Yes i want to keep clocks within a few minutes of each other. It seems to
me
> that the only way to get time from PC in ultralite program is download
time
> as record in some ultralite table. But when i write code to open ultralite
> database when notification sysAppLaunchCmdSyncN
otify occurs my program
> crashes. Is it possible to open ultralite database when
> sysAppLaunchCmdSyncN
otify occurs?
> (ASA 9.0.2.3221)
>
> With best regards , Alexey
>
>
| |
| Michael Thode 2006-01-18, 11:23 am |
| With many launch codes (sysAppLaunchCmdSync
Notify for instance) the app
doesn't have access to global variables. UL requires globals in order to
open a database.
Mike
"Alexey Panshin" <lesha@unact.ru> wrote in message
news:43c4b68d@forums
-1-dub...
>
> Greg Fenton wrote:
hotsync[color=darkre
d]
> in
etc.)?[color=darkred]
>
> Yes i want to keep clocks within a few minutes of each other. It seems to
me
> that the only way to get time from PC in ultralite program is download
time
> as record in some ultralite table. But when i write code to open ultralite
> database when notification sysAppLaunchCmdSyncN
otify occurs my program
> crashes. Is it possible to open ultralite database when
> sysAppLaunchCmdSyncN
otify occurs?
> (ASA 9.0.2.3221)
>
> With best regards , Alexey
>
>
|
|
|
|
|