From ebd5b14bf7cdb68d2cd5710d7496598cde638d88 Mon Sep 17 00:00:00 2001 From: megacz Date: Fri, 8 Mar 2002 01:03:56 +0000 Subject: 2002-03-07 Adam Megacz * 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 --- libjava/win32.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libjava/win32.cc') 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 #include +#include #include "platform.h" #include @@ -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; } -- cgit v1.2.1