Jump to content


Photo

ClockSync - synchronize device clock via NTP

- - - - -

  • Please log in to reply
31 replies to this topic

#1
JetSerge

JetSerge

    Newbie

  • Members
  • Pip
  • 49 posts
Posted Image

Synchronizes system time via NTP automatically or manually. Will be useful if your operator doesn't support automatic time synchronization via NITZ (mine doesn't and device clock lags).

ROOT is required for synchronization.

Features:
  • Displays atomic reference time, system time, clock offset and current date or last synchronization time
  • Gets atomic time from the user specified NTP server
  • Update offset by tapping on the Atomic time or Local offset values on the screen
  • Tapping on the system time will synchronize the device clock with the atomic clock
  • Update/Synchronize actions are also available from the application menu
  • Automatic synchronization on user specified interval (battery efficient!)
  • Options to synchronize only via Wi-Fi or when device is already awake
  • Optional Haptic feedback when tapping on the active screen elements
  • am/pm and 24-hour time display based on the system setting
  • Compatible with Android 1.5 and higher version including FroYo (2.2)
Posted Image Posted Image

More details:
http://amip.tools-fo...droid/clocksync

Download:

Posted Image

Background:
I've noticed that my system clock lags ~5 seconds every hour. Last time I checked it was 5 minutes behind the atomic time.

First I thought that it was SetCPU with custom underclock profiles when sleeping, so I've disabled the SetCPU profiles and even uninstalled it. Rebooted the phone, still the same issue.

Now I think that it may have something to do with the TCK 0.8 kernel or other tweaks used in the MDC ROM. My friend with the stock ROM doesn't have this problem.

I should note that you may not notice this issue at all if you have Automatic mode (use network-provided values) enabled in the phone settings and your provider supports NITZ. Unfortunately, it's not the case for me. Providers here do not support NITZ so this option does nothing, the phone can't correct its time OTA.


I had to write an app to synchronize phone clock via NTP (requires root to work). Using this app I've noticed how severe the drifting is. Will have to make it sync automatically every hour or so.

Ideas?

UPDATE1: the issue is more severe when WiFi is connected. When left overnight with WiFi off, it lagged only 0.3s, however when I've enabled WiFi it lags 5s/hour.
UPDATE2: Happens when any data connection is enabled, even 3G. However when disabled with APNdroid/Toggle Data, the time doesn't lag that much. Radio related bug?
UPDATE3: Clock lags much more when connected via USB/charging. With WiFi turned on it lagged ~1 second in 8 hours while when USB connected it lags ~5s/hour.

Edited by JetSerge, 29 May 2010 - 12:49 AM.

  • 0

#2
gcgspain

gcgspain

    Newbie

  • Members
  • Pip
  • 14 posts
It is happenning to me too. Would you care to share that app?? Thanks!!

  • 0

#3
Chicaned

Chicaned

    Regular

  • Members
  • PipPip
  • 80 posts
  • Location:Sheffield, UK
  • Interests:Nexus S ;-)<br /><br />Last three phone :-<br /><br />Nexus One<br />HTC Hero<br />Nokia N95 8gig (God that phone has aged ;-)
  • Devices:Nexus S
  • Twitter:@Chicaned_UK
Yes! I have exactly the same thing!!! Are you on Vodafone by any chance? It might be because Vodafone only send their time signal out over GPRS. I remember reading it on somewhere. Could do with an app that updates the time from t'interweb. It 'could' be the ROM/Radio though.

Edited by Chicaned, 12 May 2010 - 04:58 PM.

  • 0

#4
JetSerge

JetSerge

    Newbie

  • Members
  • Pip
  • 49 posts
Nope, I'm on MTS in Russia and one of my friends with Nexus and MDC ROM is having the same issue too.

  • 0

#5
gcgspain

gcgspain

    Newbie

  • Members
  • Pip
  • 14 posts

Yes! I have exactly the same thing!!! Are you on Vodafone by any chance? It might be because Vodafone only send their time signal out over GPRS. I remember reading it on somewhere. Could do with an app that updates the time from t'interweb. It 'could' be the ROM though.


I´m on vodafone Spain but I have the "use providers time" unmarked, because they´ve already cocked up with the time on a few ocassions. So for me its nothing to do with vodafone.

  • 0

#6
Chicaned

Chicaned

    Regular

  • Members
  • PipPip
  • 80 posts
  • Location:Sheffield, UK
  • Interests:Nexus S ;-)<br /><br />Last three phone :-<br /><br />Nexus One<br />HTC Hero<br />Nokia N95 8gig (God that phone has aged ;-)
  • Devices:Nexus S
  • Twitter:@Chicaned_UK

I´m on vodafone Spain but I have the "use providers time" unmarked, because they´ve already cocked up with the time on a few ocassions. So for me its nothing to do with vodafone.


You mean it's everything to do with Vodafone right? :)

  • 0

#7
Breece

Breece

    Newbie

  • Members
  • Pip
  • 19 posts
  • Devices:Nexus One

You mean it's everything to do with Vodafone right? :)


Having the same issue with IntersectRaven kernel and cyanogen 5.0.6 ...

[€dit]
And I am not on Vodafone ;)

Edited by Breece, 12 May 2010 - 08:46 PM.

  • 0

#8
JetSerge

JetSerge

    Newbie

  • Members
  • Pip
  • 49 posts

It is happenning to me too. Would you care to share that app?? Thanks!!

http://amip.tools-fo...droid/ClockSync

Edited by JetSerge, 25 May 2010 - 02:33 AM.

  • 0

#9
JetSerge

JetSerge

    Newbie

  • Members
  • Pip
  • 49 posts
I've updated ClockSync to 1.0.1. 1.0.0 users will need to remove old version before updating because of the key change.

  • 0

#10
bobtentpeg

bobtentpeg

    That One Guy

  • Members
  • PipPip
  • 99 posts
  • Location:In My Room, Typing This Crap
  • Devices:Nexus One
  • Twitter:@bobtentpeg

I've updated ClockSync to 1.0.1. 1.0.0 users will need to remove old version before updating because of the key change.

Only have a ~.78 sec lag after running for 40+ hours without a reboot w/ wifi enabled and everything. Nifty nevertheless

  • 0
Posted Image

#11
JetSerge

JetSerge

    Newbie

  • Members
  • Pip
  • 49 posts
Now available in Android Market!

Edited by JetSerge, 25 May 2010 - 08:07 PM.

  • 0

#12
JetSerge

JetSerge

    Newbie

  • Members
  • Pip
  • 49 posts
I've updated to FRF50 (Froyo) and system clock doesn't lag anymore! So it looks like the issue was specific to the MoDaCo Nexus One ROM.

  • 0

#13
Karolis

Karolis

    Newbie

  • Members
  • Pip
  • 41 posts
Well, I'm on froyo with CM's tweaked kernel and your app said I had 70 seconds delay.

So I'm keeping it :rolleyes:

I hope you're going to maintain it even though you feel you don't need it any more.

  • 0

#14
Chicaned

Chicaned

    Regular

  • Members
  • PipPip
  • 80 posts
  • Location:Sheffield, UK
  • Interests:Nexus S ;-)<br /><br />Last three phone :-<br /><br />Nexus One<br />HTC Hero<br />Nokia N95 8gig (God that phone has aged ;-)
  • Devices:Nexus S
  • Twitter:@Chicaned_UK

I've updated to FRF50 (Froyo) and system clock doesn't lag anymore! So it looks like the issue was specific to the MoDaCo Nexus One ROM.


Agree! I'm a happy camper.

  • 0

#15
navahoo

navahoo

    Newbie

  • Members
  • Pip
  • 14 posts
awesome app, u r the man, thanks a lot!

  • 0

#16
Mux_Mux

Mux_Mux

    Newbie

  • Members
  • Pip
  • 15 posts
  • Devices:Acer Liquid, Nexus One
Great app!!!

Thanks!

  • 0

#17
JetSerge

JetSerge

    Newbie

  • Members
  • Pip
  • 49 posts
version 1.0.3 is now available in Market

  • 0

#18
JetSerge

JetSerge

    Newbie

  • Members
  • Pip
  • 49 posts
Updated to 1.0.4:
  • fixed service for automatic synchronization

  • 0

#19
JetSerge

JetSerge

    Newbie

  • Members
  • Pip
  • 49 posts
1.0.5
  • don't keep the service running
  • increased default NTP timeout to 10 seconds
  • automatic sync will try connecting to NTP server 3 times if first attempt fails
  • added Log with diagnostics for automatic sync problems
  • added 6 hours interval

  • 0

#20
entei

entei

    Newbie

  • Members
  • Pip
  • 5 posts
  • Devices:nexus one
Very good and simple app, respect & yvagyxa! ))))

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users