diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-04-30 11:10:46 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2014-06-02 15:57:50 -0700 |
commit | 5bed8036644f552210a7cfcbed2d6d20cf2981b0 (patch) | |
tree | 37f784e181086e99b17e00d46b6da30529751539 /libutils/Timers.cpp | |
parent | bf0f25905b12581f05b65b1ebe95211c727ae483 (diff) | |
download | system_core-5bed8036644f552210a7cfcbed2d6d20cf2981b0.zip system_core-5bed8036644f552210a7cfcbed2d6d20cf2981b0.tar.gz system_core-5bed8036644f552210a7cfcbed2d6d20cf2981b0.tar.bz2 |
libutils: turn on -Werror
- Deal with some -Wunused issues
- Override PRI macros (windows)
- Revert use of PRI macros on off64_t (linux)
- Deal with a gnu++11 complaince issue
Change-Id: Ie66751293bd84477a5a6dfd8a57e700a16e36964
Diffstat (limited to 'libutils/Timers.cpp')
-rw-r--r-- | libutils/Timers.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libutils/Timers.cpp b/libutils/Timers.cpp index a431e92..4687d4d 100644 --- a/libutils/Timers.cpp +++ b/libutils/Timers.cpp @@ -32,9 +32,9 @@ #include <windows.h> #endif +#if defined(HAVE_ANDROID_OS) nsecs_t systemTime(int clock) { -#if defined(HAVE_ANDROID_OS) static const clockid_t clocks[] = { CLOCK_REALTIME, CLOCK_MONOTONIC, @@ -46,7 +46,10 @@ nsecs_t systemTime(int clock) t.tv_sec = t.tv_nsec = 0; clock_gettime(clocks[clock], &t); return nsecs_t(t.tv_sec)*1000000000LL + t.tv_nsec; +} #else +nsecs_t systemTime(int /*clock*/) +{ // Clock support varies widely across hosts. Mac OS doesn't support // posix clocks, older glibcs don't support CLOCK_BOOTTIME and Windows // is windows. @@ -54,8 +57,8 @@ nsecs_t systemTime(int clock) t.tv_sec = t.tv_usec = 0; gettimeofday(&t, NULL); return nsecs_t(t.tv_sec)*1000000000LL + nsecs_t(t.tv_usec)*1000LL; -#endif } +#endif int toMillisecondTimeoutDelay(nsecs_t referenceTime, nsecs_t timeoutTime) { |