fix gettime compilation on OS X
This commit is contained in:
parent
8561976121
commit
96c889bcab
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user