fix gettime compilation on OS X

This commit is contained in:
mniip 2014-02-25 01:12:26 +04:00
parent 8561976121
commit 96c889bcab

View File

@ -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);