[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/44411] System.nanoTime() is not independent of wall-clock
From: |
gnu_andrew at member dot fsf.org |
Subject: |
[Bug classpath/44411] System.nanoTime() is not independent of wall-clock time |
Date: |
Fri, 5 Nov 2010 00:18:35 +0000 |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44411
Andrew John Hughes <gnu_andrew at member dot fsf.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |gnu_andrew at member dot
| |fsf.org
Resolution| |FIXED
AssignedTo|unassigned at gcc dot |gnu_andrew at member dot
|gnu.org |fsf.org
--- Comment #3 from Andrew John Hughes <gnu_andrew at member dot fsf.org>
2010-11-05 00:18:31 UTC ---
CVSROOT: /sources/classpath
Module name: classpath
Changes by: Andrew John Hughes <gnu_andrew> 10/11/05 00:09:47
Modified files:
. : ChangeLog
native/jni/java-lang: java_lang_VMSystem.c
vm/reference/java/lang: VMSystem.java
Log message:
PR44411: Make VMSystem.nanoTime independent of wall time where possible.
2010-11-04 Andrew John Hughes <address@hidden>
Provide a fallback for systems without POSIX timers.
* native/jni/java-lang/java_lang_VMSystem.c:
(currentTimeMillis): New function which provides
the behaviour for both Java_java_lang_VMSystem_currentTimeMillis
and the fallback by obtaining the result of gettimeofday.
(Java_java_lang_VMSystem_nanoTime): Return currentTimeMillis
multiplied by a 1000 if a monotonic clock is unavailable.
(Java_java_lang_VMSystem_currentTimeMillis): Split main
behaviour
out into currentTimeMillis and then return its result divided by
a
1000.
2010-07-08 Roland Brand <address@hidden>
Pekka Enberg <address@hidden>
PR classpath/44411
* native/jni/java-lang/java_lang_VMSystem.c:
(Java_java_lang_VMSystem_nanoTime): Implement
using POSIX monotonic clock support and clock_gettime.
(Java_java_lang_VMSystem_currentTimeMillis):
Use old nanoTime method (which uses gettimeofday) to
provide the current time in milliseconds.
* vm/reference/java/lang/VMSystem.java:
(currentTimeMillis()): Make native with its own implementation
rather than using nanoTime, which should be
independent of wall-clock time.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.9802&r2=1.9803
http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/java-lang/java_lang_VMSystem.c?cvsroot=classpath&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/classpath/vm/reference/java/lang/VMSystem.java?cvsroot=classpath&r1=1.19&r2=1.20
- [Bug classpath/44411] System.nanoTime() is not independent of wall-clock time,
gnu_andrew at member dot fsf.org <=