From 22c7f02fe933aa955c22ea11e66c3472f886f6d6 Mon Sep 17 00:00:00 2001 From: "jean.chalard" Date: Tue, 28 Jul 2009 12:43:04 +0000 Subject: [PATCH] J : * Make the GetTime() function behave under Linux the same way it behaves under other OSes. --- JGE/src/JGE.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/JGE/src/JGE.cpp b/JGE/src/JGE.cpp index 0514c0085..d8d60039f 100644 --- a/JGE/src/JGE.cpp +++ b/JGE/src/JGE.cpp @@ -46,12 +46,15 @@ u8 JGE::GetAnalogY() } #elif defined (LINUX) // Unix specific code +#include #include "png.h" #include "../Dependencies/include/fmod.h" int JGE::GetTime(void) { - return (int)time(NULL); + struct timeval tv; + gettimeofday(&tv, NULL); + return tv.tv_sec * 1000 + tv.tv_usec / 1000; } u8 JGE::GetAnalogX()