J :
* Make the GetTime() function behave under Linux the same way it behaves under other OSes.
This commit is contained in:
+4
-1
@@ -46,12 +46,15 @@ u8 JGE::GetAnalogY()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#elif defined (LINUX) // Unix specific code
|
#elif defined (LINUX) // Unix specific code
|
||||||
|
#include <sys/time.h>
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
#include "../Dependencies/include/fmod.h"
|
#include "../Dependencies/include/fmod.h"
|
||||||
|
|
||||||
int JGE::GetTime(void)
|
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()
|
u8 JGE::GetAnalogX()
|
||||||
|
|||||||
Reference in New Issue
Block a user