diff --git a/modules/rtp_rtcp/source/time_util.h b/modules/rtp_rtcp/source/time_util.h index 3e7d1e29f1..672722c07f 100644 --- a/modules/rtp_rtcp/source/time_util.h +++ b/modules/rtp_rtcp/source/time_util.h @@ -20,8 +20,8 @@ namespace webrtc { // Converts time obtained using rtc::TimeMicros to ntp format. // TimeMicrosToNtp guarantees difference of the returned values matches // difference of the passed values. -// As a result TimeMicrosToNtp(rtc::TimeMicros()) doesn't guarantte to match -// system time after first call. +// As a result TimeMicrosToNtp(rtc::TimeMicros()) doesn't guarantee to match +// system time. NtpTime TimeMicrosToNtp(int64_t time_us); // Converts NTP timestamp to RTP timestamp. diff --git a/modules/rtp_rtcp/source/time_util_unittest.cc b/modules/rtp_rtcp/source/time_util_unittest.cc index 25cda491f9..0ff4f7b079 100644 --- a/modules/rtp_rtcp/source/time_util_unittest.cc +++ b/modules/rtp_rtcp/source/time_util_unittest.cc @@ -16,29 +16,6 @@ namespace webrtc { -// Disabled as flake: http://bugs.webrtc.org/8610 -#ifdef WEBRTC_IOS -#define MAYBE_TimeMicrosToNtpMatchRealTimeClockInitially \ - DISABLED_TimeMicrosToNtpMatchRealTimeClockInitially -#else -#define MAYBE_TimeMicrosToNtpMatchRealTimeClockInitially \ - TimeMicrosToNtpMatchRealTimeClockInitially -#endif -TEST(TimeUtilTest, MAYBE_TimeMicrosToNtpMatchRealTimeClockInitially) { - Clock* legacy_clock = Clock::GetRealTimeClock(); - NtpTime before_legacy_time = TimeMicrosToNtp(rtc::TimeMicros()); - NtpTime legacy_time = legacy_clock->CurrentNtpTime(); - NtpTime after_legacy_time = TimeMicrosToNtp(rtc::TimeMicros()); - - // This test will fail once every 136 years, when NtpTime wraparound. - // More often than that, it will fail if system adjust ntp time while test - // is running. - // To mitigate ntp time adjustment and potentional different precisions of - // Clock and TimeMicrosToNtp, relax expectation by a millisecond. - EXPECT_GE(legacy_time.ToMs(), before_legacy_time.ToMs() - 1); - EXPECT_LE(legacy_time.ToMs(), after_legacy_time.ToMs() + 1); -} - TEST(TimeUtilTest, TimeMicrosToNtpDoesntChangeBetweenRuns) { rtc::ScopedFakeClock clock; // TimeMicrosToNtp is not pure: it behave differently between different