summaryrefslogtreecommitdiffstats
path: root/base/time
diff options
context:
space:
mode:
Diffstat (limited to 'base/time')
-rw-r--r--base/time/time.h8
-rw-r--r--base/time/time_posix.cc19
2 files changed, 9 insertions, 18 deletions
diff --git a/base/time/time.h b/base/time/time.h
index 41d662a..f08ba68 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -576,14 +576,6 @@ inline Time TimeDelta::operator+(Time t) const {
class BASE_EXPORT TimeTicks {
public:
- // We define this even without OS_CHROMEOS for seccomp sandbox testing.
-#if defined(OS_LINUX)
- // Force definition of the system trace clock; it is a chromeos-only api
- // at the moment and surfacing it in the right place requires mucking
- // with glibc et al.
- static const clockid_t kClockSystemTrace = 11;
-#endif
-
TimeTicks() : ticks_(0) {
}
diff --git a/base/time/time_posix.cc b/base/time/time_posix.cc
index 3037c98..6b08bb3 100644
--- a/base/time/time_posix.cc
+++ b/base/time/time_posix.cc
@@ -320,19 +320,18 @@ TimeTicks TimeTicks::ThreadNow() {
#endif
}
-// NaCl IRT does not support the Chrome OS specific clock
-// ID. build/common.gypi sets OS_CHROMEOS without any other OS_*
-// macros for untrusted NaCl build so we need to check
-// __native_client__ explicitly.
-// TODO(hamaji): Do not specify OS_CHROMEOS for untrusted NaCl build
-// and remove !defined(__native_client__).
-#if defined(OS_CHROMEOS) && !defined(__native_client__)
+#if defined(OS_CHROMEOS)
+// Force definition of the system trace clock; it is a chromeos-only api
+// at the moment and surfacing it in the right place requires mucking
+// with glibc et al.
+#define CLOCK_SYSTEM_TRACE 11
+
// static
TimeTicks TimeTicks::NowFromSystemTraceTime() {
uint64_t absolute_micro;
struct timespec ts;
- if (clock_gettime(kClockSystemTrace, &ts) != 0) {
+ if (clock_gettime(CLOCK_SYSTEM_TRACE, &ts) != 0) {
// NB: fall-back for a chrome os build running on linux
return HighResNow();
}
@@ -344,14 +343,14 @@ TimeTicks TimeTicks::NowFromSystemTraceTime() {
return TimeTicks(absolute_micro);
}
-#else // !(defined(OS_CHROMEOS) && !defined(__native_client__))
+#else // !defined(OS_CHROMEOS)
// static
TimeTicks TimeTicks::NowFromSystemTraceTime() {
return HighResNow();
}
-#endif // defined(OS_CHROMEOS) && !defined(__native_client__)
+#endif // defined(OS_CHROMEOS)
#endif // !OS_MACOSX