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

Side by Side Diff: webrtc/libjingle/xmpp/pingtask.cc

Issue 1835053002: Change default timestamp to 64 bits in all webrtc directories. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add TODO for timestamp. Created 4 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 unified diff | Download patch
« no previous file with comments | « webrtc/libjingle/xmpp/pingtask.h ('k') | webrtc/libjingle/xmpp/xmpppump.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 if (ping_period_millis_ < ping_timeout_millis_) { 50 if (ping_period_millis_ < ping_timeout_millis_) {
51 LOG(LS_ERROR) << "ping_period_millis should be >= ping_timeout_millis"; 51 LOG(LS_ERROR) << "ping_period_millis should be >= ping_timeout_millis";
52 return STATE_ERROR; 52 return STATE_ERROR;
53 } 53 }
54 const buzz::XmlElement* stanza = NextStanza(); 54 const buzz::XmlElement* stanza = NextStanza();
55 if (stanza != NULL) { 55 if (stanza != NULL) {
56 // Received a ping response of some sort (don't care what it is). 56 // Received a ping response of some sort (don't care what it is).
57 ping_response_deadline_ = 0; 57 ping_response_deadline_ = 0;
58 } 58 }
59 59
60 uint32_t now = rtc::Time(); 60 int64_t now = rtc::TimeMillis();
61 61
62 // If the ping timed out, signal. 62 // If the ping timed out, signal.
63 if (ping_response_deadline_ != 0 && now >= ping_response_deadline_) { 63 if (ping_response_deadline_ != 0 && now >= ping_response_deadline_) {
64 SignalTimeout(); 64 SignalTimeout();
65 return STATE_ERROR; 65 return STATE_ERROR;
66 } 66 }
67 67
68 // Send a ping if it's time. 68 // Send a ping if it's time.
69 if (now >= next_ping_time_) { 69 if (now >= next_ping_time_) {
70 std::unique_ptr<buzz::XmlElement> stanza( 70 std::unique_ptr<buzz::XmlElement> stanza(
(...skipping 13 matching lines...) Expand all
84 return STATE_BLOCKED; 84 return STATE_BLOCKED;
85 } 85 }
86 86
87 void PingTask::OnMessage(rtc::Message* msg) { 87 void PingTask::OnMessage(rtc::Message* msg) {
88 // Get the task manager to run this task so we can send a ping or signal or 88 // Get the task manager to run this task so we can send a ping or signal or
89 // process a ping response. 89 // process a ping response.
90 Wake(); 90 Wake();
91 } 91 }
92 92
93 } // namespace buzz 93 } // namespace buzz
OLDNEW
« no previous file with comments | « webrtc/libjingle/xmpp/pingtask.h ('k') | webrtc/libjingle/xmpp/xmpppump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698