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

Unified Diff: net/quic/core/quic_time.h

Issue 2871573009: Use clock_gettime instead of base::TimeTicks::Now() in QUIC (Closed)
Patch Set: Fallback Created 3 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 | « no previous file | net/quic/platform/api/quic_clock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_time.h
diff --git a/net/quic/core/quic_time.h b/net/quic/core/quic_time.h
index ee4a38c988f17b393453ba13de07884737a45ec1..18ef46f117040f2cd237e9cf518e8949e292e977 100644
--- a/net/quic/core/quic_time.h
+++ b/net/quic/core/quic_time.h
@@ -24,6 +24,8 @@
namespace net {
+class QuicClock;
+
// A QuicTime is a purely relative time. QuicTime values from different clocks
// cannot be compared to each other. If you need an absolute time, see
// QuicWallTime, below.
@@ -104,8 +106,6 @@ class QUIC_EXPORT_PRIVATE QuicTime {
friend class QuicClock;
};
- explicit QuicTime(base::TimeTicks ticks) : time_(ticks.ToInternalValue()) {}
-
// Creates a new QuicTime with an internal value of 0. IsInitialized()
// will return false for these times.
static QUICTIME_CONSTEXPR QuicTime Zero() { return QuicTime(0); }
@@ -124,6 +124,8 @@ class QUIC_EXPORT_PRIVATE QuicTime {
inline bool IsInitialized() const { return 0 != time_; }
private:
+ friend class QuicClock;
+
friend inline bool operator==(QuicTime lhs, QuicTime rhs);
friend inline bool operator<(QuicTime lhs, QuicTime rhs);
friend inline QuicTime operator+(QuicTime lhs, QuicTime::Delta rhs);
« no previous file with comments | « no previous file | net/quic/platform/api/quic_clock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698