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

Side by Side Diff: net/quic/core/quic_time.cc

Issue 2611613003: Add quic_logging (Closed)
Patch Set: fix failed test? Created 3 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/core/quic_time.h" 5 #include "net/quic/core/quic_time.h"
6 6
7 #include <cinttypes> 7 #include <cinttypes>
8 #include <cstdlib> 8 #include <cstdlib>
9 #include <limits> 9 #include <limits>
10 10
11 #include "base/logging.h"
12 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
13 12
14 using base::StringPrintf; 13 using base::StringPrintf;
15 using std::string; 14 using std::string;
16 15
17 namespace net { 16 namespace net {
18 17
19 string QuicTime::Delta::ToDebugValue() const { 18 string QuicTime::Delta::ToDebugValue() const {
20 const int64_t one_ms = 1000; 19 const int64_t one_ms = 1000;
21 const int64_t one_s = 1000 * one_ms; 20 const int64_t one_s = 1000 * one_ms;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // TODO(ianswett) Test this. 78 // TODO(ianswett) Test this.
80 QuicWallTime QuicWallTime::Subtract(QuicTime::Delta delta) const { 79 QuicWallTime QuicWallTime::Subtract(QuicTime::Delta delta) const {
81 uint64_t microseconds = microseconds_ - delta.ToMicroseconds(); 80 uint64_t microseconds = microseconds_ - delta.ToMicroseconds();
82 if (microseconds > microseconds_) { 81 if (microseconds > microseconds_) {
83 microseconds = 0; 82 microseconds = 0;
84 } 83 }
85 return QuicWallTime(microseconds); 84 return QuicWallTime(microseconds);
86 } 85 }
87 86
88 } // namespace net 87 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_sustained_bandwidth_recorder.cc ('k') | net/quic/core/quic_unacked_packet_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698