diff options
author | Elliott Hughes <enh@google.com> | 2013-06-21 00:52:56 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-06-21 00:52:56 +0000 |
commit | 61abfba7767a4ceb09ba69b03f42ef3bc3828e37 (patch) | |
tree | f844645339c106045a4088ad31cb41cb9813925c /luni | |
parent | 7bd5cc7f252dc16ab434cb1440abe5152e28f9c1 (diff) | |
parent | 508bf13ba75610c75c4f40811dde0ec7e401f4c1 (diff) | |
download | libcore-61abfba7767a4ceb09ba69b03f42ef3bc3828e37.zip libcore-61abfba7767a4ceb09ba69b03f42ef3bc3828e37.tar.gz libcore-61abfba7767a4ceb09ba69b03f42ef3bc3828e37.tar.bz2 |
Merge "Revert "Use CLOCK_MONOTONIC_RAW for System.nanoTime.""
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/main/java/java/lang/System.java | 3 | ||||
-rw-r--r-- | luni/src/main/native/java_lang_System.cpp | 6 |
2 files changed, 2 insertions, 7 deletions
diff --git a/luni/src/main/java/java/lang/System.java b/luni/src/main/java/java/lang/System.java index 46aed59..c825118 100644 --- a/luni/src/main/java/java/lang/System.java +++ b/luni/src/main/java/java/lang/System.java @@ -170,8 +170,7 @@ public final class System { /** * Returns the current timestamp of the most precise timer available on the - * local system, in nanoseconds. Equivalent to something like Linux's - * {@code CLOCK_MONOTONIC_RAW}. + * local system, in nanoseconds. Equivalent to Linux's {@code CLOCK_MONOTONIC}. * * <p>This timestamp should only be used to measure a duration by comparing it * against another timestamp from the same process on the same device. diff --git a/luni/src/main/native/java_lang_System.cpp b/luni/src/main/native/java_lang_System.cpp index 2c48309..0686310 100644 --- a/luni/src/main/native/java_lang_System.cpp +++ b/luni/src/main/native/java_lang_System.cpp @@ -94,11 +94,7 @@ static jlong System_currentTimeMillis(JNIEnv*, jclass) { static jlong System_nanoTime(JNIEnv*, jclass) { timespec now; -#ifdef CLOCK_MONOTONIC_RAW - clock_gettime(CLOCK_MONOTONIC_RAW, &now); -#else // Darwin, say. - clock_gettime(CLOCK_MONOTONIC, &now); -#endif + clock_gettime(CLOCK_MONOTONIC, &now); return now.tv_sec * 1000000000LL + now.tv_nsec; } |