Is there a way to know the ppm of the clock oscillator in a smartphone?

For example, in the Android documentation on System Clock, there is a function elapsedRealtimeNanos, which guarantees a monotonic clock. However, I would like to know how much drift may occur when compared to an atomic clock. Even using NTP won't reveal any intuition on what is an expected amount of drift given the current hardware in phones.

If it's possible, can you share where you found the ppm information and how to calculate the error (in seconds) after x seconds have passed?


ppm error on the oscillator may vary from one model to another. Here are some ballpark numbers.

  • simple crystal oscillator. 5 to 20 ppm
  • TCXO (temperature compensated crystal oscillator). 1 to 3 ppm drift, typically.

Calculating error envelope from ppm is easy. 1 ppm is 1 microsecond. In 1 second, a 20 ppm clock can gain or loose 20 μs in the worst case.

On a smart phone, can you access the GPS time? It originates from atomic clocks. GPS time has good long term stability. Just an $0.02 thought.

Another somewhat related thread.

| improve this answer | |
  • \$\begingroup\$ Smartphones allow you to access the GPS time, but it isn't reliable because the GPS chip doesn't provide a pulse-per-second (PPS) pin. If it did, the PPS pin would be connected to the CPU and the kernel would support an interrupt routine for this. Not possible to reliably read the GPS timestamp on a millisecond scale in my tests due to power saving features of phones. I hadn't realized pmm is directly related to ms, I thought I had to multiply by frequency. Your explanation is consistent with the literature I've read on NTP. Something between 10-20 ppm should be sufficient for most analysis. \$\endgroup\$ – Rich Sep 30 '13 at 2:25
  • \$\begingroup\$ Two phones drifted by a total of 60 milliseconds over 15 minutes, so the ppm is 66666? Is this logical? 60=15*60*ppm*10^-6 \$\endgroup\$ – Rich Sep 30 '13 at 6:12
  • \$\begingroup\$ @Roak Given 60 ms drift over 15 min, I get 66.66(6) ppm. About the same order of magnitude for drift as in typical crystals. \$\endgroup\$ – Nick Alexeev Sep 30 '13 at 6:27
  • 1
    \$\begingroup\$ Bear in mind that that the total drift is the difference between the drifts of the two oscillators; if one is very fast and the other is very slow, the differential could easily hit 66ppm. \$\endgroup\$ – markt Sep 30 '13 at 7:57
  • \$\begingroup\$ Can you provide your calculations? \$\endgroup\$ – Rich Oct 8 '13 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.