Skip to content

Commit

Permalink
fix gettime compilation on OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
mniip committed Feb 24, 2014
1 parent 8561976 commit 96c889b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Misc.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 96c889b

Please sign in to comment.