summaryrefslogtreecommitdiff
path: root/libjava/win32.cc
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2006-03-09 18:47:54 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2006-03-09 18:47:54 +0000
commitc44de8ab02bf815fb920a2e6f1e6e16aadf05b07 (patch)
tree744b26f2524a58c1a0d12f1c85353fc349623374 /libjava/win32.cc
parent595e90415cd831dfd3680ccdb134f5f71392a88e (diff)
downloadgcc-c44de8ab02bf815fb920a2e6f1e6e16aadf05b07.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111869 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/win32.cc')
-rw-r--r--libjava/win32.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/libjava/win32.cc b/libjava/win32.cc
index c337922d296..a0ae0f0f9cb 100644
--- a/libjava/win32.cc
+++ b/libjava/win32.cc
@@ -1,6 +1,6 @@
// win32.cc - Helper functions for Microsoft-flavored OSs.
-/* Copyright (C) 2002, 2003 Free Software Foundation
+/* Copyright (C) 2002, 2003, 2006 Free Software Foundation
This file is part of libgcj.
@@ -279,6 +279,12 @@ _Jv_platform_gettimeofday ()
return t.time * 1000LL + t.millitm;
}
+jlong
+_Jv_platform_nanotime ()
+{
+ return _Jv_platform_gettimeofday () * 1000LL;
+}
+
// The following definitions "fake out" mingw to think that -mthreads
// was enabled and that mingwthr.dll was linked. GCJ-compiled
// applications don't need this helper library because we can safely