mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
20 lines
345 B
C++
20 lines
345 B
C++
#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
|