implement System.nanoTime

This is a quick and coarse, but servicable, implementation.
This commit is contained in:
Joel Dice 2011-04-08 20:32:33 -06:00
parent 76fa43548d
commit c0f39fbe0c

View File

@ -20,6 +20,8 @@ import java.io.FileDescriptor;
import java.util.Properties;
public abstract class System {
private static final long NanoTimeBaseInMillis = currentTimeMillis();
private static Property properties;
private static SecurityManager securityManager;
@ -94,6 +96,10 @@ public abstract class System {
public static native int identityHashCode(Object o);
public static long nanoTime() {
return (currentTimeMillis() - NanoTimeBaseInMillis) * 1000000;
}
public static String mapLibraryName(String name) {
if (name != null) {
return doMapLibraryName(name);