mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-27 09:54:36 +02:00
fix gettime compilation on OS X
This commit is contained in:
@@ -673,6 +673,10 @@ long unsigned int gettime()
|
|||||||
{
|
{
|
||||||
#ifdef WIN
|
#ifdef WIN
|
||||||
return GetTickCount();
|
return GetTickCount();
|
||||||
|
#elif defined(MACOSX)
|
||||||
|
struct timeval s;
|
||||||
|
gettimeofday(&s, NULL);
|
||||||
|
return (unsigned int)(s.tv_sec * 1000 + s.tv_usec / 1000);
|
||||||
#else
|
#else
|
||||||
struct timespec s;
|
struct timespec s;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &s);
|
clock_gettime(CLOCK_MONOTONIC, &s);
|
||||||
|
Reference in New Issue
Block a user