diff --git a/modules/rtp_rtcp/source/remote_ntp_time_estimator.cc b/modules/rtp_rtcp/source/remote_ntp_time_estimator.cc index 6fed7314c0..131118f15e 100644 --- a/modules/rtp_rtcp/source/remote_ntp_time_estimator.cc +++ b/modules/rtp_rtcp/source/remote_ntp_time_estimator.cc @@ -15,6 +15,7 @@ #include "modules/rtp_rtcp/source/time_util.h" #include "rtc_base/logging.h" #include "system_wrappers/include/clock.h" +#include "system_wrappers/include/ntp_time.h" namespace webrtc { @@ -53,7 +54,7 @@ bool RemoteNtpTimeEstimator::UpdateRtcpTimestamp(int64_t rtt, // The extrapolator assumes the ntp time. int64_t receiver_arrival_time_ms = clock_->TimeInMilliseconds() + NtpOffsetMs(); - int64_t sender_send_time_ms = Clock::NtpToMs(ntp_secs, ntp_frac); + int64_t sender_send_time_ms = NtpTime(ntp_secs, ntp_frac).ToMs(); int64_t sender_arrival_time_ms = sender_send_time_ms + rtt / 2; int64_t remote_to_local_clocks_offset = receiver_arrival_time_ms - sender_arrival_time_ms; diff --git a/system_wrappers/include/clock.h b/system_wrappers/include/clock.h index 3c60f63da8..f70a2f4e85 100644 --- a/system_wrappers/include/clock.h +++ b/system_wrappers/include/clock.h @@ -45,11 +45,6 @@ class RTC_EXPORT Clock { // Retrieve an NTP absolute timestamp in milliseconds. virtual int64_t CurrentNtpInMilliseconds() = 0; - // Converts an NTP timestamp to a millisecond timestamp. - static int64_t NtpToMs(uint32_t seconds, uint32_t fractions) { - return NtpTime(seconds, fractions).ToMs(); - } - // Returns an instance of the real-time system clock implementation. static Clock* GetRealTimeClock(); }; diff --git a/system_wrappers/source/ntp_time_unittest.cc b/system_wrappers/source/ntp_time_unittest.cc index cdaca67fbe..0705531e37 100644 --- a/system_wrappers/source/ntp_time_unittest.cc +++ b/system_wrappers/source/ntp_time_unittest.cc @@ -56,7 +56,6 @@ TEST(NtpTimeTest, ToMsMeansToNtpMilliseconds) { SimulatedClock clock(0x123456789abc); NtpTime ntp = clock.CurrentNtpTime(); - EXPECT_EQ(ntp.ToMs(), Clock::NtpToMs(ntp.seconds(), ntp.fractions())); EXPECT_EQ(ntp.ToMs(), clock.CurrentNtpInMilliseconds()); }