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

Unified Diff: webrtc/api/statscollector.cc

Issue 2290203002: Delete Timing class, timing.h, and update all users. (Closed)
Patch Set: Address nits. Created 4 years, 3 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 | « no previous file | webrtc/base/BUILD.gn » ('j') | webrtc/base/timeutils.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/statscollector.cc
diff --git a/webrtc/api/statscollector.cc b/webrtc/api/statscollector.cc
index ffe241568bd4a141f17e0071276e1cbe6920f411..e4aa7ce7a649064739d9fd0c68a8e0889b64aba7 100644
--- a/webrtc/api/statscollector.cc
+++ b/webrtc/api/statscollector.cc
@@ -17,7 +17,6 @@
#include "webrtc/api/peerconnection.h"
#include "webrtc/base/base64.h"
#include "webrtc/base/checks.h"
-#include "webrtc/base/timing.h"
#include "webrtc/pc/channel.h"
namespace webrtc {
@@ -375,8 +374,10 @@ StatsCollector::~StatsCollector() {
RTC_DCHECK(pc_->session()->signaling_thread()->IsCurrent());
}
+// Wallclock time in ms.
double StatsCollector::GetTimeNow() {
- return rtc::Timing::WallTimeNow() * rtc::kNumMillisecsPerSec;
+ return rtc::TimeUTCMicros() /
+ static_cast<double>(rtc::kNumMicrosecsPerMillisec);
}
// Adds a MediaStream with tracks that can be used as a |selector| in a call
@@ -467,6 +468,9 @@ void
StatsCollector::UpdateStats(PeerConnectionInterface::StatsOutputLevel level) {
RTC_DCHECK(pc_->session()->signaling_thread()->IsCurrent());
double time_now = GetTimeNow();
+
+ LOG(LS_INFO) << "UpdateStats: time_now = " << time_now;
hbos 2016/09/08 07:50:43 Do we really want this log? Its LS_INFO, but it's
nisse-webrtc 2016/09/08 09:07:14 Probably not. I'll remove it.
+
// Calls to UpdateStats() that occur less than kMinGatherStatsPeriod number of
// ms apart will be ignored.
const double kMinGatherStatsPeriod = 50;
« no previous file with comments | « no previous file | webrtc/base/BUILD.gn » ('j') | webrtc/base/timeutils.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698