I am writing an app that relies on precise clock synchronization between devices. I can sync up the clocks using NTP with good precision, and they stay in sync as long as the phones are plugged in. However, if either phone becomes disconnected from power and goes through a few sleep/wake cycles (e.g. by pressing the power button or letting it time out), the clocks will be out of sync by 0.3 - 0.7 seconds, whereas I need millisecond precision.
My understanding was that *S*ystemClock.elapsedRealtime() should be immune to sleep / deep sleep states. What might be going on, and is it possible to fix this behavior? In my test code, I simply have a loop inside a thread that constantly looks at elapsedRealtime and updates UI if necessary. My test devices are HTC Hero with CM7 / Gingerbread, and Nexus S 4G with ICS.* --l * -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

