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