* commit 'ca7616f21d51faef34771351caffc3d00c2579dd': Fix Mac sdk builds
This commit is contained in:
committed by
Android Git Automerger
commit
f0f9b1bd40
@@ -24,7 +24,7 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#else
|
#else
|
||||||
#error "Unsupported platform"
|
#include <time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
long long GetCurrentTimeMS()
|
long long GetCurrentTimeMS()
|
||||||
@@ -47,9 +47,12 @@ long long GetCurrentTimeMS()
|
|||||||
long long iDiff = (now.tv_sec * 1000LL) + now.tv_nsec/1000000LL;
|
long long iDiff = (now.tv_sec * 1000LL) + now.tv_nsec/1000000LL;
|
||||||
return iDiff;
|
return iDiff;
|
||||||
|
|
||||||
#else
|
#else /* Others, e.g. OS X */
|
||||||
|
|
||||||
#error "Unsupported platform"
|
struct timeval now;
|
||||||
|
gettimeofday(&now, NULL);
|
||||||
|
long long iDiff = (now.tv_sec * 1000LL) + now.tv_usec/1000LL;
|
||||||
|
return iDiff;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user