diff options
author | sleffler@chromium.org <sleffler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-10 21:10:47 +0000 |
---|---|---|
committer | sleffler@chromium.org <sleffler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-10 21:10:47 +0000 |
commit | dc5675654d1d86cc437f3f957e492676ae1c81a9 (patch) | |
tree | 08d7a0c17db60b1f167162bbd2a6ef754b62ed29 /base/time_posix.cc | |
parent | 38a8c17f71dea027deca8ce99f5d72a98411d5a4 (diff) | |
download | chromium_src-dc5675654d1d86cc437f3f957e492676ae1c81a9.zip chromium_src-dc5675654d1d86cc437f3f957e492676ae1c81a9.tar.gz chromium_src-dc5675654d1d86cc437f3f957e492676ae1c81a9.tar.bz2 |
Enable system trace clock use on chrome os.
Manually define CLOCK_SYSTEM_TRACE for OS_CHROMEOS. This is in the code (and not gyp) to minimize scope.
BUG=chromium-os:30502
TEST=verify chrome:tracing works w/ a chromeos=1 build on linux and on cros (using the correct clock in each case)
Change-Id: I9439a1de9fe30cb2f34652020a29a4450b71e1ea
Review URL: https://chromiumcodereview.appspot.com/10356028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136389 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/time_posix.cc')
-rw-r--r-- | base/time_posix.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/time_posix.cc b/base/time_posix.cc index b8f1385..1c96451 100644 --- a/base/time_posix.cc +++ b/base/time_posix.cc @@ -24,6 +24,12 @@ namespace base { #if defined(OS_ANDROID) #define _POSIX_MONOTONIC_CLOCK 1 #endif +#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 +#endif struct timespec TimeDelta::ToTimeSpec() const { int64 microseconds = InMicroseconds(); |