Use base::TimeTicks() instead of base::Time() for measuring a histogram time delta. This hopefully fixes a divide by zero issue where elapsed time was unexpectedly small.
BUG=98290
Review URL: http://codereview.chromium.org/8054029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103301 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/spellchecker/spellcheck_host_metrics.h b/chrome/browser/spellchecker/spellcheck_host_metrics.h
index 538abc17..a1d8722 100644
--- a/chrome/browser/spellchecker/spellcheck_host_metrics.h
+++ b/chrome/browser/spellchecker/spellcheck_host_metrics.h
@@ -56,9 +56,9 @@
// attempt to be uploaded via UMA
void RecordSuggestionStats(int delta);
+ private:
void OnHistogramTimerExpired();
- private:
// Records various counters without changing their values.
void RecordWordCounts();
@@ -71,7 +71,7 @@
// Number of misspelled words replaced by a user.
int replaced_word_count_;
// Time when first spellcheck happened.
- base::Time start_time_;
+ base::TimeTicks start_time_;
// Set of checked words in the hashed form.
base::hash_set<std::string> checked_word_hashes_;
base::RepeatingTimer<SpellCheckHostMetrics> recording_timer_;