What is the reason for this?
System.nanoTime()
's resolution is device and OS dependent. So if your device's internal clock resolution is too high, System.nanoTime()
won't be able to improve things.
is there any better way to try measuring the time this method takes to execute and return?
You can run the method more than once to increase the time spent. But note that benchmarking is a complicated art. You can start with this post: How do I write a correct micro-benchmark in Java? Although it focuses on the hotspot JVM, most principles apply to Dalvik.