diff options
author | Sven de Marothy <sven@physto.se> | 2006-07-26 20:18:01 +0000 |
---|---|---|
committer | Sven de Marothy <sven@physto.se> | 2006-07-26 20:18:01 +0000 |
commit | dad1155567400c9106590f41b3f911f1482c58ad (patch) | |
tree | 843015d72072b0e55263e754767c0f8c3cdbd70b /vm | |
parent | fc802c9325e352614243b2cd9e2b06ed8114a0d7 (diff) | |
download | classpath-dad1155567400c9106590f41b3f911f1482c58ad.tar.gz |
2006-07-26 Sven de Marothy <sven@physto.se>
* include/java_lang_VMSystem.h
* vm/reference/java/lang/VMSystem.java
* native/jni/java-lang/java_lang_VMSystem.c
(nanoTime, currentTimeMillis): Switch the former to native code and
the latter to java.
Diffstat (limited to 'vm')
-rw-r--r-- | vm/reference/java/lang/VMSystem.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vm/reference/java/lang/VMSystem.java b/vm/reference/java/lang/VMSystem.java index f96986df3..bf46b27aa 100644 --- a/vm/reference/java/lang/VMSystem.java +++ b/vm/reference/java/lang/VMSystem.java @@ -135,7 +135,10 @@ final class VMSystem * @return the current time * @see java.util.Date */ - public static native long currentTimeMillis(); + public static long currentTimeMillis() + { + return nanoTime() / 1000000L; + } /** * <p> @@ -162,10 +165,7 @@ final class VMSystem * @return the time of a system timer in nanoseconds. * @since 1.5 */ - public static long nanoTime() - { - return currentTimeMillis() * 1000; - } + public static native long nanoTime(); /** * Returns a list of 'name=value' pairs representing the current environment |