summaryrefslogtreecommitdiff
path: root/libs/utils/SystemClock.cpp
diff options
context:
space:
mode:
author Kenny Root <kroot@google.com> 2011-02-16 10:13:53 -0800
committer Kenny Root <kroot@google.com> 2011-02-16 10:56:32 -0800
commitaf1cf07134dccc884c654da0e713c9213d7be3f4 (patch)
treea4343f8ed4c9e66c7437149572049681a09e8dbd /libs/utils/SystemClock.cpp
parent1ad7de7372466ac37ec4b0ec031e6466d533ebb4 (diff)
Clean up use of HAVE_ANDROID_OS
HAVE_ANDROID_OS was defined as "1" for targets, but never defined as "0" for non-targets. Changing them to #ifdef should be safe and matches all the other uses of HAVE_ANDROID_OS throughout the system. Change-Id: I82257325a8ae5e4e4371ddfc4dbf51cea8ea0abb
Diffstat (limited to 'libs/utils/SystemClock.cpp')
-rw-r--r--libs/utils/SystemClock.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/utils/SystemClock.cpp b/libs/utils/SystemClock.cpp
index 2bdc0ce278..062e6d76bf 100644
--- a/libs/utils/SystemClock.cpp
+++ b/libs/utils/SystemClock.cpp
@@ -19,7 +19,7 @@
* System clock functions.
*/
-#if HAVE_ANDROID_OS
+#ifdef HAVE_ANDROID_OS
#include <linux/ioctl.h>
#include <linux/rtc.h>
#include <utils/Atomic.h>
@@ -50,7 +50,7 @@ int setCurrentTimeMillis(int64_t millis)
return -1;
#else
struct timeval tv;
-#if HAVE_ANDROID_OS
+#ifdef HAVE_ANDROID_OS
struct timespec ts;
int fd;
int res;
@@ -66,7 +66,7 @@ int setCurrentTimeMillis(int64_t millis)
LOGD("Setting time of day to sec=%d\n", (int) tv.tv_sec);
-#if HAVE_ANDROID_OS
+#ifdef HAVE_ANDROID_OS
fd = open("/dev/alarm", O_RDWR);
if(fd < 0) {
LOGW("Unable to open alarm driver: %s\n", strerror(errno));
@@ -106,7 +106,7 @@ int64_t uptimeMillis()
*/
int64_t elapsedRealtime()
{
-#if HAVE_ANDROID_OS
+#ifdef HAVE_ANDROID_OS
static int s_fd = -1;
if (s_fd == -1) {