Android isn't a real-time OS, but System.Nanotime() works just as well with the built-in timer as an external oscillator.
I suspect they're grabbing a digital input state change interrupt to get some real time processing, if you could get Android to give you access to a timer ISR that would work just as well.