Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3092)

Unified Diff: base/stats_counters.h

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/stats_counters.h
===================================================================
--- base/stats_counters.h (revision 3954)
+++ base/stats_counters.h (working copy)
@@ -187,15 +187,15 @@
void Start() {
if (!Enabled())
return;
- start_time_ = TimeTicks::Now();
- stop_time_ = TimeTicks();
+ start_time_ = base::TimeTicks::Now();
+ stop_time_ = base::TimeTicks();
}
// Stop the timer and record the results.
void Stop() {
if (!Enabled() || !Running())
return;
- stop_time_ = TimeTicks::Now();
+ stop_time_ = base::TimeTicks::Now();
Record();
}
@@ -205,12 +205,12 @@
}
// Accept a TimeDelta to increment.
- virtual void AddTime(TimeDelta time) {
+ virtual void AddTime(base::TimeDelta time) {
Add(static_cast<int>(time.InMilliseconds()));
}
// TODO(jar) temporary hack include method till base and chrome use new name.
- void IncrementTimer(TimeDelta time) {
+ void IncrementTimer(base::TimeDelta time) {
AddTime(time);
}
@@ -220,8 +220,8 @@
AddTime(stop_time_ - start_time_);
}
- TimeTicks start_time_;
- TimeTicks stop_time_;
+ base::TimeTicks start_time_;
+ base::TimeTicks stop_time_;
};
// A StatsRate is a timer that keeps a count of the number of intervals added so
« no previous file with comments | « base/spin_wait.h ('k') | base/stats_table_unittest.cc » ('j') | base/time_format.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698