aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang/natSystem.cc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2006-03-09 18:47:54 +0000
committerTom Tromey <tromey@gcc.gnu.org>2006-03-09 18:47:54 +0000
commite59a1e40f318e53c11a069140e4380ca05dd75cd (patch)
tree744b26f2524a58c1a0d12f1c85353fc349623374 /libjava/java/lang/natSystem.cc
parentcbbb5b6da1a7ac6efd97d97cda4cbd4868c56eaf (diff)
downloadgcc-e59a1e40f318e53c11a069140e4380ca05dd75cd.zip
gcc-e59a1e40f318e53c11a069140e4380ca05dd75cd.tar.gz
gcc-e59a1e40f318e53c11a069140e4380ca05dd75cd.tar.bz2
win32.cc (_Jv_platform_nanotime): New function.
* win32.cc (_Jv_platform_nanotime): New function. * include/win32.h (_Jv_platform_nanotime): Declare. * posix.cc (_Jv_platform_nanotime): New function. * include/posix.h (_Jv_platform_nanotime): Declare. * java/lang/natSystem.cc (nanoTime): New method. * java/lang/System.java (nanoTime): Declare. * include/config.h.in, configure: Rebuilt. * configure.ac: Check for clock_gettime. From-SVN: r111869
Diffstat (limited to 'libjava/java/lang/natSystem.cc')
-rw-r--r--libjava/java/lang/natSystem.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/libjava/java/lang/natSystem.cc b/libjava/java/lang/natSystem.cc
index 0a4c8b9..42a1325 100644
--- a/libjava/java/lang/natSystem.cc
+++ b/libjava/java/lang/natSystem.cc
@@ -1,6 +1,6 @@
// natSystem.cc - Native code implementing System class.
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006 Free Software Foundation
This file is part of libgcj.
@@ -124,6 +124,12 @@ java::lang::System::currentTimeMillis (void)
return _Jv_platform_gettimeofday ();
}
+jlong
+java::lang::System::nanoTime ()
+{
+ return _Jv_platform_nanotime ();
+}
+
jint
java::lang::System::identityHashCode (jobject obj)
{