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

Unified Diff: base/time/time.cc

Issue 1122153002: Fixit: Fork base::TimeTicks --> TimeTicks + ThreadTicks + TraceTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@FIXIT_timeclasses_1of2
Patch Set: REBASE after it passed CQ but did not commit to tree Created 5 years, 7 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
« no previous file with comments | « base/time/time.h ('k') | base/time/time_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time.cc
diff --git a/base/time/time.cc b/base/time/time.cc
index 9834188597d479038b7bca055d2584feea091913..8cbb382bb9616dfc6ed2e7f0742630845745aa62 100644
--- a/base/time/time.cc
+++ b/base/time/time.cc
@@ -327,6 +327,16 @@ std::ostream& operator<<(std::ostream& os, TimeTicks time_ticks) {
return os << as_time_delta.InMicroseconds() << " bogo-microseconds";
}
+std::ostream& operator<<(std::ostream& os, ThreadTicks thread_ticks) {
+ const TimeDelta as_time_delta = thread_ticks - ThreadTicks();
+ return os << as_time_delta.InMicroseconds() << " bogo-thread-microseconds";
+}
+
+std::ostream& operator<<(std::ostream& os, TraceTicks trace_ticks) {
+ const TimeDelta as_time_delta = trace_ticks - TraceTicks();
+ return os << as_time_delta.InMicroseconds() << " bogo-trace-microseconds";
+}
+
// Time::Exploded -------------------------------------------------------------
inline bool is_in_range(int value, int lo, int hi) {
« no previous file with comments | « base/time/time.h ('k') | base/time/time_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698