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

Unified Diff: net/quic/quic_time.cc

Issue 15937012: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small bug fixes Created 7 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
Index: net/quic/quic_time.cc
diff --git a/net/quic/quic_time.cc b/net/quic/quic_time.cc
index fa0d51628f9e6d78b26dde88e02ee67e000b669d..a56775663e4969b36cbe01713f419576143ed549 100644
--- a/net/quic/quic_time.cc
+++ b/net/quic/quic_time.cc
@@ -104,6 +104,11 @@ QuicWallTime QuicWallTime::FromUNIXSeconds(uint64 seconds) {
return QuicWallTime(seconds);
}
+// static
+QuicWallTime QuicWallTime::Zero() {
+ return QuicWallTime(0);
+}
+
uint64 QuicWallTime::ToUNIXSeconds() const {
return seconds_;
}
@@ -116,6 +121,10 @@ bool QuicWallTime::IsBefore(QuicWallTime other) const {
return seconds_ < other.seconds_;
}
+bool QuicWallTime::IsZero() const {
+ return seconds_ == 0;
+}
+
QuicTime::Delta QuicWallTime::AbsoluteDifference(QuicWallTime other) const {
uint64 d;

Powered by Google App Engine
This is Rietveld 408576698