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

Unified Diff: webrtc/p2p/base/relayport.cc

Issue 1793553002: Using 64-bit timestamp in webrtc/p2p (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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 | « webrtc/p2p/base/port_unittest.cc ('k') | webrtc/p2p/base/relayserver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/relayport.cc
diff --git a/webrtc/p2p/base/relayport.cc b/webrtc/p2p/base/relayport.cc
index 19883a3121a4f0d31347540e1cc14da2b26b2197..f5ad911796a07312c28ca562c3e4cf2f01317c5e 100644
--- a/webrtc/p2p/base/relayport.cc
+++ b/webrtc/p2p/base/relayport.cc
@@ -16,7 +16,7 @@
namespace cricket {
-static const uint32_t kMessageConnectTimeout = 1;
+static const int kMessageConnectTimeout = 1;
static const int kKeepAliveDelay = 10 * 60 * 1000;
static const int kRetryTimeout = 50 * 1000; // ICE says 50 secs
// How long to wait for a socket to connect to remote host in milliseconds
@@ -175,7 +175,7 @@ class AllocateRequest : public StunRequest {
private:
RelayEntry* entry_;
RelayConnection* connection_;
- uint32_t start_time_;
+ int64_t start_time_;
};
RelayPort::RelayPort(rtc::Thread* thread,
@@ -779,7 +779,7 @@ AllocateRequest::AllocateRequest(RelayEntry* entry,
: StunRequest(new RelayMessage()),
entry_(entry),
connection_(connection) {
- start_time_ = rtc::Time();
+ start_time_ = rtc::Time64();
}
void AllocateRequest::Prepare(StunMessage* request) {
@@ -834,7 +834,7 @@ void AllocateRequest::OnErrorResponse(StunMessage* response) {
<< " reason='" << attr->reason() << "'";
}
- if (rtc::TimeSince(start_time_) <= kRetryTimeout)
+ if (rtc::Time64() - start_time_ <= kRetryTimeout)
entry_->ScheduleKeepAlive();
}
« no previous file with comments | « webrtc/p2p/base/port_unittest.cc ('k') | webrtc/p2p/base/relayserver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698