Descent3/libmve/platform.cpp

24 lines
353 B
C++
Raw Normal View History

2024-04-16 03:43:29 +00:00
#if _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <MMSystem.h>
unsigned int platform_timeGetTime(void)
{
return timeGetTime();
}
#else
#include <unistd.h>
#include <sys/time.h>
unsigned int platform_timeGetTime(void)
{
struct timeval t;
gettimeofday(&t,NULL);
return (t.tv_sec*1000 + t.tv_usec/1000);
}
#endif