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

Unified Diff: webrtc/video/vie_sync_module.cc

Issue 1888593004: Delete all use of tick_util.h. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. 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/video/vie_sync_module.h ('k') | webrtc/voice_engine/monitor_module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/vie_sync_module.cc
diff --git a/webrtc/video/vie_sync_module.cc b/webrtc/video/vie_sync_module.cc
index 02a82de4bbff453506cf162c773aade950819704..2e62ff8143938d3591925056657b8a84bfbb082e 100644
--- a/webrtc/video/vie_sync_module.cc
+++ b/webrtc/video/vie_sync_module.cc
@@ -12,6 +12,7 @@
#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
+#include "webrtc/base/timeutils.h"
#include "webrtc/base/trace_event.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
@@ -55,7 +56,7 @@ ViESyncModule::ViESyncModule(vcm::VideoReceiver* video_receiver)
video_rtp_rtcp_(nullptr),
voe_channel_id_(-1),
voe_sync_interface_(nullptr),
- last_sync_time_(TickTime::Now()),
+ last_sync_time_(rtc::TimeNanos()),
sync_() {}
ViESyncModule::~ViESyncModule() {
@@ -84,12 +85,13 @@ void ViESyncModule::ConfigureSync(int voe_channel_id,
int64_t ViESyncModule::TimeUntilNextProcess() {
const int64_t kSyncIntervalMs = 1000;
- return kSyncIntervalMs - (TickTime::Now() - last_sync_time_).Milliseconds();
+ return kSyncIntervalMs -
+ (rtc::TimeNanos() - last_sync_time_) / rtc::kNumNanosecsPerMillisec;
}
void ViESyncModule::Process() {
rtc::CritScope lock(&data_cs_);
- last_sync_time_ = TickTime::Now();
+ last_sync_time_ = rtc::TimeNanos();
const int current_video_delay_ms = video_receiver_->Delay();
« no previous file with comments | « webrtc/video/vie_sync_module.h ('k') | webrtc/voice_engine/monitor_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698