diff options
| author | David 'Digit' Turner <digit@android.com> | 2011-04-05 15:37:31 +0200 |
|---|---|---|
| committer | David 'Digit' Turner <digit@android.com> | 2011-04-05 15:37:31 +0200 |
| commit | c29456a00086521ada5516e3eb25f7d22a7ed601 (patch) | |
| tree | d1f99e707ca379f409c38071526971cb2814a0ff /tools/emulator/opengl/shared/OpenglCodecCommon/TimeUtils.cpp | |
| parent | e8c05eb11a966887daa96dab64aea40c4862775c (diff) | |
Fix Mac sdk builds
Change-Id: Ia90be6b2ef10520ab2efb70fc03332a36e531ddc
Diffstat (limited to 'tools/emulator/opengl/shared/OpenglCodecCommon/TimeUtils.cpp')
| -rw-r--r-- | tools/emulator/opengl/shared/OpenglCodecCommon/TimeUtils.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/emulator/opengl/shared/OpenglCodecCommon/TimeUtils.cpp b/tools/emulator/opengl/shared/OpenglCodecCommon/TimeUtils.cpp index 7f65cca5e..5d0d91aae 100644 --- a/tools/emulator/opengl/shared/OpenglCodecCommon/TimeUtils.cpp +++ b/tools/emulator/opengl/shared/OpenglCodecCommon/TimeUtils.cpp @@ -24,7 +24,7 @@ #include <sys/time.h> #include <time.h> #else -#error "Unsupported platform" +#include <time.h> #endif long long GetCurrentTimeMS() @@ -47,9 +47,12 @@ long long GetCurrentTimeMS() long long iDiff = (now.tv_sec * 1000LL) + now.tv_nsec/1000000LL; 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 } |
