From dad1155567400c9106590f41b3f911f1482c58ad Mon Sep 17 00:00:00 2001 From: Sven de Marothy Date: Wed, 26 Jul 2006 20:18:01 +0000 Subject: 2006-07-26 Sven de Marothy * 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. --- vm/reference/java/lang/VMSystem.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'vm') 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; + } /** *

@@ -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 -- cgit v1.2.1