diff options
| author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2010-11-05 00:09:46 +0000 |
|---|---|---|
| committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2010-11-05 00:09:46 +0000 |
| commit | ce35f0abe5467d056c79abfe9bfb8acbc8f0c580 (patch) | |
| tree | 40f0ae598fabd66e04c24f43017b90f8c30da5cd /vm/reference/java/security/VMAccessController.java | |
| parent | 6605e28839909048684f485fa931cce6fa11535b (diff) | |
| download | classpath-ce35f0abe5467d056c79abfe9bfb8acbc8f0c580.tar.gz | |
PR44411: Make VMSystem.nanoTime independent of wall time where possible.
2010-11-04 Andrew John Hughes <ahughes@redhat.com>
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 <roland.brand@ergon.ch>
Pekka Enberg <penberg@kernel.org>
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.
Diffstat (limited to 'vm/reference/java/security/VMAccessController.java')
0 files changed, 0 insertions, 0 deletions
