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

Side by Side Diff: remoting/base/rate_counter.h

Issue 18052008: Use a direct include of time headers in ppapi/, printing/, remoting/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « remoting/base/plugin_thread_task_runner.h ('k') | remoting/base/rsa_key_pair.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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef REMOTING_BASE_RATE_COUNTER_H_ 5 #ifndef REMOTING_BASE_RATE_COUNTER_H_
6 #define REMOTING_BASE_RATE_COUNTER_H_ 6 #define REMOTING_BASE_RATE_COUNTER_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/threading/non_thread_safe.h" 12 #include "base/threading/non_thread_safe.h"
13 #include "base/time.h" 13 #include "base/time/time.h"
14 14
15 namespace remoting { 15 namespace remoting {
16 16
17 // Measures average rate per second of a sequence of point rate samples 17 // Measures average rate per second of a sequence of point rate samples
18 // over a specified time window. This can be used to measure bandwidth, frame 18 // over a specified time window. This can be used to measure bandwidth, frame
19 // rates, etc. 19 // rates, etc.
20 class RateCounter : public base::NonThreadSafe { 20 class RateCounter : public base::NonThreadSafe {
21 public: 21 public:
22 // Constructs a rate counter over the specified |time_window|. 22 // Constructs a rate counter over the specified |time_window|.
23 explicit RateCounter(base::TimeDelta time_window); 23 explicit RateCounter(base::TimeDelta time_window);
(...skipping 30 matching lines...) Expand all
54 54
55 // If set, used to calculate the running average, in place of Now(). 55 // If set, used to calculate the running average, in place of Now().
56 base::Time current_time_for_test_; 56 base::Time current_time_for_test_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(RateCounter); 58 DISALLOW_COPY_AND_ASSIGN(RateCounter);
59 }; 59 };
60 60
61 } // namespace remoting 61 } // namespace remoting
62 62
63 #endif // REMOTING_BASE_RATE_COUNTER_H_ 63 #endif // REMOTING_BASE_RATE_COUNTER_H_
OLDNEW
« no previous file with comments | « remoting/base/plugin_thread_task_runner.h ('k') | remoting/base/rsa_key_pair.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698