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

Unified Diff: net/quic/quic_time.h

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.h
diff --git a/net/quic/quic_time.h b/net/quic/quic_time.h
index 067027befc326c95ebea7fd616a9c03da34673f0..9c846c9be264400a7dea63e1a02f3a72633edfdd 100644
--- a/net/quic/quic_time.h
+++ b/net/quic/quic_time.h
@@ -108,6 +108,10 @@ class NET_EXPORT_PRIVATE QuicWallTime {
// since the UNIX epoch.
static QuicWallTime FromUNIXSeconds(uint64 seconds);
+ // Zero returns a QuicWallTime set to zero. IsZero will return true for this
+ // value.
+ static QuicWallTime Zero();
+
// ToUNIXSeconds converts a QuicWallTime into a count of seconds since the
// UNIX epoch.
uint64 ToUNIXSeconds() const;
@@ -115,6 +119,9 @@ class NET_EXPORT_PRIVATE QuicWallTime {
bool IsAfter(QuicWallTime other) const;
bool IsBefore(QuicWallTime other) const;
+ // IsZero returns true if this object is the result of calling |Zero|.
+ bool IsZero() const;
+
// AbsoluteDifference returns the absolute value of the time difference
// between |this| and |other|.
QuicTime::Delta AbsoluteDifference(QuicWallTime other) const;

Powered by Google App Engine
This is Rietveld 408576698