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

Unified Diff: webrtc/base/ratetracker.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/physicalsocketserver.cc ('k') | webrtc/base/ratetracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/ratetracker.h
diff --git a/webrtc/base/ratetracker.h b/webrtc/base/ratetracker.h
index d49d7cacdd5344f09ff38284e70bb9e32d885476..6ae9bec119d23552c6f967416ad897af81741ffa 100644
--- a/webrtc/base/ratetracker.h
+++ b/webrtc/base/ratetracker.h
@@ -21,19 +21,19 @@ namespace rtc {
// that over each bucket the rate was constant.
class RateTracker {
public:
- RateTracker(uint32_t bucket_milliseconds, size_t bucket_count);
+ RateTracker(int64_t bucket_milliseconds, size_t bucket_count);
virtual ~RateTracker();
// Computes the average rate over the most recent interval_milliseconds,
// or if the first sample was added within this period, computes the rate
// since the first sample was added.
- double ComputeRateForInterval(uint32_t interval_milliseconds) const;
+ double ComputeRateForInterval(int64_t interval_milliseconds) const;
// Computes the average rate over the rate tracker's recording interval
// of bucket_milliseconds * bucket_count.
double ComputeRate() const {
return ComputeRateForInterval(bucket_milliseconds_ *
- static_cast<uint32_t>(bucket_count_));
+ static_cast<int64_t>(bucket_count_));
}
// Computes the average rate since the first sample was added to the
@@ -49,19 +49,19 @@ class RateTracker {
protected:
// overrideable for tests
- virtual uint32_t Time() const;
+ virtual int64_t Time() const;
private:
void EnsureInitialized();
size_t NextBucketIndex(size_t bucket_index) const;
- const uint32_t bucket_milliseconds_;
+ const int64_t bucket_milliseconds_;
const size_t bucket_count_;
size_t* sample_buckets_;
size_t total_sample_count_;
size_t current_bucket_;
- uint32_t bucket_start_time_milliseconds_;
- uint32_t initialization_time_milliseconds_;
+ int64_t bucket_start_time_milliseconds_;
+ int64_t initialization_time_milliseconds_;
};
} // namespace rtc
« no previous file with comments | « webrtc/base/physicalsocketserver.cc ('k') | webrtc/base/ratetracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698