summaryrefslogtreecommitdiffstats
path: root/base/profiler
diff options
context:
space:
mode:
authorsimonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-13 02:45:59 +0000
committersimonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-13 02:45:59 +0000
commita7eda97977f5988c5a095e940823220b4511598b (patch)
tree7e794e00b286a00689890762401fb1783f43454c /base/profiler
parentb19ba553811bb027aadf6b7c1f52ca8142f33912 (diff)
downloadchromium_src-a7eda97977f5988c5a095e940823220b4511598b.zip
chromium_src-a7eda97977f5988c5a095e940823220b4511598b.tar.gz
chromium_src-a7eda97977f5988c5a095e940823220b4511598b.tar.bz2
Enable high resolution time for TimeTicks::Now on Windows Canary
This should be unnoticeable, except for improved resolution in places such as window.performance.now(). The feature is enabled if the user is running Canary channel or has manually specified the --enable-high-resolution-time flag. This will only work if the CPU has a non-stop TSC and isn't a broken Athlon processor. UMA data show this is a safe combination. The flag is propagated to renderer processes so that they know to enable it too. BUG=158234 Review URL: https://chromiumcodereview.appspot.com/16896018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217172 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/profiler')
-rw-r--r--base/profiler/tracked_time.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/base/profiler/tracked_time.cc b/base/profiler/tracked_time.cc
index 27d3358..7791c3a 100644
--- a/base/profiler/tracked_time.cc
+++ b/base/profiler/tracked_time.cc
@@ -55,8 +55,7 @@ TrackedTime TrackedTime::Now() {
// Use lock-free accessor to 32 bit time.
// Note that TimeTicks::Now() is built on this, so we have "compatible"
// times when we down-convert a TimeTicks sample.
- // TODO(jar): Surface this interface via something in base/time/time.h.
- return TrackedTime(static_cast<int32>(timeGetTime()));
+ return TrackedTime(base::TimeTicks::UnprotectedNow());
#else
// Posix has nice cheap 64 bit times, so we just down-convert it.
return TrackedTime(base::TimeTicks::Now());