Merge "base: chrono_utils: supported in linux" am: 142303b9d9 am: 8b8fc5cfae am: 415f9b864b
am: 30fccc6d5b
Change-Id: Iebc6ae0d0e5de9d8359c7e90e038d7dc5c814ed3
diff --git a/base/chrono_utils.cpp b/base/chrono_utils.cpp
index b6bf701..dbe5483 100644
--- a/base/chrono_utils.cpp
+++ b/base/chrono_utils.cpp
@@ -22,7 +22,7 @@
namespace base {
boot_clock::time_point boot_clock::now() {
-#ifdef __ANDROID__
+#ifdef __linux__
timespec ts;
clock_gettime(CLOCK_BOOTTIME, &ts);
return boot_clock::time_point(std::chrono::seconds(ts.tv_sec) +
@@ -30,7 +30,7 @@
#else
// Darwin does not support clock_gettime.
return boot_clock::time_point();
-#endif // __ANDROID__
+#endif // __linux__
}
std::ostream& operator<<(std::ostream& os, const Timer& t) {