diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-21 21:59:02 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-21 21:59:02 +0000 |
commit | a66e24c34a22a4a183b91ad80d74e896a4f4db5f (patch) | |
tree | 9ef6baf7f3eabbdf0205b0f6176d6922d439829d /base | |
parent | 384e2a552494d4ccb0b34d1bb8e84af806050c41 (diff) | |
download | chromium_src-a66e24c34a22a4a183b91ad80d74e896a4f4db5f.zip chromium_src-a66e24c34a22a4a183b91ad80d74e896a4f4db5f.tar.gz chromium_src-a66e24c34a22a4a183b91ad80d74e896a4f4db5f.tar.bz2 |
Switch application start time from Time to TimeTicks.
This is a landing of a contribution by tfarina.
See CL http://codereview.chromium.org/200038
r=tfarina
Review URL: http://codereview.chromium.org/208046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/field_trial.cc | 4 | ||||
-rw-r--r-- | base/field_trial.h | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/base/field_trial.cc b/base/field_trial.cc index 0bf39e2..137c8c3 100644 --- a/base/field_trial.cc +++ b/base/field_trial.cc @@ -8,7 +8,7 @@ #include "base/rand_util.h" #include "base/string_util.h" -using base::Time; +using base::TimeTicks; // static const int FieldTrial::kNotParticipating = -1; @@ -70,7 +70,7 @@ FieldTrialList* FieldTrialList::global_ = NULL; // static bool FieldTrialList::register_without_global_ = false; -FieldTrialList::FieldTrialList() : application_start_time_(Time::Now()) { +FieldTrialList::FieldTrialList() : application_start_time_(TimeTicks::Now()) { DCHECK(!global_); DCHECK(!register_without_global_); global_ = this; diff --git a/base/field_trial.h b/base/field_trial.h index a26bde8f..82bf3b36 100644 --- a/base/field_trial.h +++ b/base/field_trial.h @@ -193,12 +193,11 @@ class FieldTrialList { // of the application. In some experiments it may be useful to discount // data that is gathered before the application has reached sufficient // stability (example: most DLL have loaded, etc.) - static base::Time application_start_time() { + static base::TimeTicks application_start_time() { if (global_) return global_->application_start_time_; // For testing purposes only, or when we don't yet have a start time. - // TODO(jar): Switch to TimeTicks - return base::Time::Now(); + return base::TimeTicks::Now(); } private: @@ -218,7 +217,7 @@ class FieldTrialList { // A helper value made availabel to users, that shows when the FieldTrialList // was initialized. Note that this is a singleton instance, and hence is a // good approximation to the start of the process. - base::Time application_start_time_; + base::TimeTicks application_start_time_; // Lock for access to registered_. Lock lock_; |