webOS Nation Forums >  webOS apps and software >  webOS app reviews > Clock Sync - For all those who have problems with time drifting
Clock Sync - For all those who have problems with time drifting

  Reply
Like Tree1Likes

 
LinkBack Thread Tools Display Modes
Old 02/22/2010, 08:43 AM   #1 (permalink)
Member
 
Join Date: Feb 2010
Posts: 21
Likes Received: 1
Thanks: 0
Thanked 9 Times in 2 Posts
Default Clock Sync - For all those who have problems with time drifting

Hi,
starting from today "Clock Sync" is available for free in the app catalog.
It removes another major pain point for many (especially european) users as it regularily syncs a device with the standard time from the internet.

It is not using ntp which is not available for regular applications, but instead it retrieves the time from a webserver that is itself using ntp. The received time should be fairly accurate (~ 2 sec).

And the best: Clock Sync can sync regularily in the background and keep a device always in sync with the standard time.

Update Version 1.1:
I added some monitoring capabilities. There is a history in which every sync is written and a monitoring mode which just writes the statistic but does not actually sync the device. Use this if you are not sure if the timing issues are resolved for you with the 1.4 webos upgrade.

Update Version 1.2:
Scheduling was added. If you want your phone to sync at a specific time during a day, you no longer need to do some math when using the periodic sync. Instead you can schedule it directly using the new "Fixed time" sync mode.

I would be happy to receive some feedback!

Regards,
Markus

Last edited by jocsch; 04/12/2010 at 04:03 AM. Reason: Update 1.2
jocsch is offline   Reply With Quote
Liked by 2wings likes this.
Old 02/22/2010, 11:48 AM   #2 (permalink)
Member
 
Join Date: Oct 2009
Posts: 26
Likes Received: 0
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Thanks! I started using it right now. So I cannot give you much feedback but from what it promises it seems to be great. Perhaps I'll give you some more feedback later this week.

To improve accuracy a bit you could try to measure the roundtrip time and use it in the time calculation.
alex3683 is offline   Reply With Quote
Old 02/22/2010, 12:04 PM   #3 (permalink)
ldj
Member
 
Join Date: Jul 2009
Posts: 259
Likes Received: 2
Thanks: 3
Thanked 7 Times in 6 Posts
Default

Out of interest, what API did you use to set the clock? I didn't think there was support for this in the SDK?
__________________
Follow me on twitter | My Website
ldj is offline   Reply With Quote
Old 02/22/2010, 12:15 PM   #4 (permalink)
Member
 
Join Date: Oct 2009
Posts: 26
Likes Received: 0
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Quote:
Originally Posted by ldj View Post
Out of interest, what API did you use to set the clock? I didn't think there was support for this in the SDK?
From what he said I assume he uses a simple ajax call to a webserver sending back its time set via NTP. Thereby the time on the pre should be as accurate as NTP + network latency can be.
alex3683 is offline   Reply With Quote
Old 02/22/2010, 12:48 PM   #5 (permalink)
ldj
Member
 
Join Date: Jul 2009
Posts: 259
Likes Received: 2
Thanks: 3
Thanked 7 Times in 6 Posts
Default

Quote:
Originally Posted by alex3683 View Post
From what he said I assume he uses a simple ajax call to a webserver sending back its time set via NTP. Thereby the time on the pre should be as accurate as NTP + network latency can be.
Yep, but I didn't think there were any officially supported API's for setting the time on the device, and thus how such functionality could get in the app catalog?!?
__________________
Follow me on twitter | My Website
ldj is offline   Reply With Quote
Old 02/22/2010, 12:53 PM   #6 (permalink)
Member
 
Join Date: Aug 2005
Location: San Antonio, TX
Posts: 118
Likes Received: 0
Thanks: 5
Thanked 25 Times in 14 Posts
Default

Well done!!! If this works as desired, you'll be a hero for many folks!
vara411 is offline   Reply With Quote
Old 02/22/2010, 12:57 PM   #7 (permalink)
Member
 
Join Date: Oct 2009
Posts: 26
Likes Received: 0
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Quote:
Originally Posted by ldj View Post
Yep, but I didn't think there were any officially supported API's for setting the time on the device, and thus how such functionality could get in the app catalog?!?
Good point Let's wait what he has to tell us about that.
alex3683 is offline   Reply With Quote
Old 02/22/2010, 01:05 PM   #8 (permalink)
Banned
 
Join Date: Feb 2010
Location: Oceanside, California.
Posts: 3,265
Likes Received: 1
Thanks: 433
Thanked 967 Times in 782 Posts
Default

I don't have a problem with mine,if i do i'll be happy to use that app.
RUSH is offline   Reply With Quote
Old 02/22/2010, 09:16 PM   #9 (permalink)
Member
 
Join Date: Oct 2009
Posts: 674
Likes Received: 0
Thanks: 105
Thanked 203 Times in 107 Posts
Default

Apparently there is an API for setting the time. It's there in app/models/backend.js if you want to take a look at it. The idea is actually quite clever.
__________________
Treo 300 > Hitachi G1000 > PPC-6700 > PPC-6800 (Mogul) > PPC-6850 (Touch Pro) > Palm Pre & HTC EVO Optimus V
dallashigh is offline   Reply With Quote
Old 02/23/2010, 02:11 AM   #10 (permalink)
Member
 
Join Date: Feb 2010
Posts: 21
Likes Received: 1
Thanks: 0
Thanked 9 Times in 2 Posts
Default

Hi,

Quote:
Out of interest, what API did you use to set the clock? I didn't think there was support for this in the SDK?
I am not sure if the API (setSystemTime on SystemService) is not supported. It is "not documented". But nobody blocks you from using it. I had my doubts if Palm accepts this app in the catalog as somewhere they state, that "not documented" APis shouldn't be used. But maybe Palm saw the struggles that a lot of people have with the clock. I am still hoping that they fix it with 1.4 natively.

Quote:
From what he said I assume he uses a simple ajax call to a webserver sending back its time set via NTP. Thereby the time on the pre should be as accurate as NTP + network latency can be.
Yep. That's how it works. If you have features that you like to see implemented, please post them.

Regards,
Markus
jocsch is offline   Reply With Quote
Old 02/23/2010, 03:49 AM   #11 (permalink)
Member
 
Join Date: Feb 2010
Posts: 21
Likes Received: 1
Thanks: 0
Thanked 9 Times in 2 Posts
Default

Quote:
To improve accuracy a bit you could try to measure the roundtrip time and use it in the time calculation.
I thought about it. But it would at least double the number of requests send out to the webserver and even then it would just be an estimate.

And as normally the response is pretty fast (connection is established etc), the gain would be marginal.

Maybe I get to that topic again but there are some other features I want to tackle first.
jocsch is offline   Reply With Quote
Old 02/24/2010, 01:22 AM   #12 (permalink)
Member
 
Join Date: Oct 2009
Posts: 26
Likes Received: 0
Thanks: 6
Thanked 3 Times in 3 Posts
Default

One thing you could add for me is the option to disable notifications. I'm a person that doesn't want to be notified if something works and sometimes even not actively if it doesn't ;-)
So an internal logging mechanism showing the result (success / failure, time difference that was measured and corrected, etc.) of the last 10 sync attempts or so and the option to disable the banner notification would be nice for me.
alex3683 is offline   Reply With Quote
Old 02/24/2010, 03:44 AM   #13 (permalink)
Member
 
Join Date: Feb 2010
Posts: 21
Likes Received: 1
Thanks: 0
Thanked 9 Times in 2 Posts
Default

Quote:
Originally Posted by alex3683 View Post
One thing you could add for me is the option to disable notifications. I'm a person that doesn't want to be notified if something works and sometimes even not actively if it doesn't ;-)
So an internal logging mechanism showing the result (success / failure, time difference that was measured and corrected, etc.) of the last 10 sync attempts or so and the option to disable the banner notification would be nice for me.
Looks like the app needs an "Advanced configuration" screen. I'll takle that in a future update.
jocsch is offline   Reply With Quote
Old 02/28/2010, 02:25 AM   #14 (permalink)
Member
 
mscemt's Avatar
 
Join Date: Jul 2009
Posts: 72
Likes Received: 0
Thanks: 8
Thanked 6 Times in 4 Posts
Default

From what I can tell the newest update fixed the clock drift problems, I'm currious if anyone is still having the issue. I disabled periodic sync and have had accurate time for about 18 hours so far.
mscemt is offline   Reply With Quote
Old 02/28/2010, 02:47 AM   #15 (permalink)
Member
 
Join Date: Oct 2009
Posts: 26
Likes Received: 0
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Quote:
Originally Posted by mscemt View Post
From what I can tell the newest update fixed the clock drift problems, I'm currious if anyone is still having the issue. I disabled periodic sync and have had accurate time for about 18 hours so far.
same for me.
alex3683 is offline   Reply With Quote
Old 02/28/2010, 04:08 AM   #16 (permalink)
ldj
Member
 
Join Date: Jul 2009
Posts: 259
Likes Received: 2
Thanks: 3
Thanked 7 Times in 6 Posts
Default

Yep, early days but signs are good thus far...
ldj is offline   Reply With Quote
Old 02/28/2010, 04:32 AM   #17 (permalink)
Member
 
Join Date: Oct 2009
Posts: 26
Likes Received: 0
Thanks: 6
Thanked 3 Times in 3 Posts
Default

so nevertheless many thanks for your efforts and the time this app served us well :-)
alex3683 is offline   Reply With Quote
Old 02/28/2010, 04:42 AM   #18 (permalink)
Member
 
Join Date: Feb 2010
Posts: 21
Likes Received: 1
Thanks: 0
Thanked 9 Times in 2 Posts
Default

Glad to hear. I just have 1.4 for 4 hours now, so I can't judge on this. Nevertheless I am glad that Palm fixed it finally and we can proudly say, that our phone keeps the time on its own ;-)

For me it was more a learning exercise in webos development. That's why the source code is available as well. Now it might serve as an example project for other webos development beginners: jocsch's ClockSync at master - GitHub

I will release an updated version (once the app submission page is working for me again), that includes some logging capabilities to monitor whether the deivce is on time. That's just for the curious and to give the app a reason to stay on the app catalog ;-)
jocsch is offline   Reply With Quote
Old 03/02/2010, 02:13 AM   #19 (permalink)
Member
 
Join Date: Feb 2010
Posts: 21
Likes Received: 1
Thanks: 0
Thanked 9 Times in 2 Posts
Default

I have added a monitoring mode to Clock Sync and run it for the last 30hrs.
The clock issue is definitely resolved by Palm. I had 3-4 exceptions where the clock was off by ~55sec. All the other times it was sharp on time.
jocsch is offline   Reply With Quote
Old 03/16/2010, 05:37 AM   #20 (permalink)
one
Member
 
Join Date: Feb 2010
Posts: 55
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, I live in Germany (provider vodafone over debitel) and I have the pre since some weeks.
The first OS I had was WebOS 1.3.5.2 it was "seldom able to get the network time" (waiting for network time ....) and it was drifting ca. 5 min per week.

Since Saturday I have the 1.4.0. It is still seldom able to get network time (airplane on/off works (mostly) but even if I do not get any "waiting for network" message I do not think is pooling the NTP server anymore after the airplane on/off procedure because
NOW I have 2-4 min drift every day!
That's ridiculous!

Any ideas out there? Did really the 1.4.0 update solve your time problems?

The pre support on the telephone yesterday let me do a "delete application" procedure which helped NOTHING except let me pay huge amount of "data money" 270 euro! (I do not have data flat) to reinstall all the applications: THANKS PALM (thanks even not to have saied me that it would have redownoaded all the application and install them again!).

They suggested me to have a look if this procedure has helped and, in case not, to reset/reinstall the phone using the WebDoctor: I'm not going to do it (i was already stupid enough yesterday to trust the HotLine). The OS is linux based and a deinstall/install has never ever been a linux way of solving problems!

By the way from where does it get the network time? (provider over "tel", provider over "data channel", wireless, GPS, all of them)
Is it using "true" NTP or what?
How often does it pool?
If it drifts so much in my opinion:
1) it has a extremely bad internal clock
2) it pools the NTP server too less often / never after the airplane on/off switch!

@jocsch: Does your application work with the 1.4.0 update? I do not have data flat but I am often on a wireless net ..... Does it activate automatically the network connection in case not active or skip the pool until the next time it has network (best)?

Last edited by one; 03/16/2010 at 07:20 AM.
one is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0