diff options
author | megacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-08 01:03:56 +0000 |
---|---|---|
committer | megacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-08 01:03:56 +0000 |
commit | ebd5b14bf7cdb68d2cd5710d7496598cde638d88 (patch) | |
tree | 5a6ecf62aa2257aff8b6a4fbbe492852b116c5d2 /libjava/win32.cc | |
parent | 19338723537cb0ec25b3c8d3fac5f3f224b6bae0 (diff) | |
download | gcc-ebd5b14bf7cdb68d2cd5710d7496598cde638d88.tar.gz |
2002-03-07 Adam Megacz <adam@xwt.org>
* win32.cc (_Jv_platform_gettimeofday): Now takes no args,
returns jlong. Added implementation
* posix.cc (_Jv_platform_gettimeofday): Now takes no args,
returns jlong.
* win32.h (_Jv_platform_gettimeofday): Now takes no args,
returns jlong.
* posix.h (_Jv_platform_gettimeofday): Now takes no args,
returns jlong.
* java/lang/natSystem.cc (currentTimeMillis): Now uses updated
_Jv_platform_gettimeofday signature.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50416 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/win32.cc')
-rw-r--r-- | libjava/win32.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libjava/win32.cc b/libjava/win32.cc index f425462523d..a019cb75806 100644 --- a/libjava/win32.cc +++ b/libjava/win32.cc @@ -10,6 +10,7 @@ details. */ #include <config.h> #include <jvm.h> +#include <sys/timeb.h> #include "platform.h" #include <java/lang/ArithmeticException.h> @@ -39,10 +40,11 @@ _Jv_platform_initialize (void) } // gettimeofday implementation. -void -_Jv_platform_gettimeofday (struct timeval *tv) +jlong +_Jv_platform_gettimeofday () { - // FIXME - return; + struct timeb t; + ftime (&t); + return t.time * 1000 + t.millitm; } |