On Jul 11, 10:09 pm, Victor Lin <borns...@gmail.com> wrote:
> "This method shouldn't be used for measuring timeouts or other elapsed
> time measurements, as changing the system time can affect the
> results."
>
> So, if this method should not be used for measuring elapsed time, then
> what will be suitable?

java.lang.System.nanoTime() uses the monotonic clock.  From the
javadoc:

"This method can only be used to measure elapsed time and is not
related to any other notion of system or wall-clock time. The value
returned represents nanoseconds since some fixed but arbitrary time
(perhaps in the future, so values may be negative)."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to