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

Unified Diff: webrtc/system_wrappers/source/clock_unittest.cc

Issue 2694713002: Replace use of Clock::CurrentNtp with Clock::CurrentNtpTime (Closed)
Patch Set: Created 3 years, 10 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/modules/rtp_rtcp/source/rtcp_sender.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/source/clock_unittest.cc
diff --git a/webrtc/system_wrappers/source/clock_unittest.cc b/webrtc/system_wrappers/source/clock_unittest.cc
index 5010d37c18a8e75a8765f0a46d020644bfdbce36..dcd932774ea4f2cdeb2a086f6b23d3b4757dfad3 100644
--- a/webrtc/system_wrappers/source/clock_unittest.cc
+++ b/webrtc/system_wrappers/source/clock_unittest.cc
@@ -16,8 +16,6 @@ namespace webrtc {
TEST(ClockTest, NtpTime) {
Clock* clock = Clock::GetRealTimeClock();
- uint32_t seconds;
- uint32_t fractions;
// To ensure the test runs correctly even on a heavily loaded system, do not
// compare the seconds/fractions and millisecond values directly. Instead,
@@ -26,11 +24,11 @@ TEST(ClockTest, NtpTime) {
// The comparison includes 1 ms of margin to account for the rounding error in
// the conversion.
int64_t milliseconds_lower_bound = clock->CurrentNtpInMilliseconds();
- clock->CurrentNtp(seconds, fractions);
+ NtpTime ntp_time = clock->CurrentNtpTime();
int64_t milliseconds_upper_bound = clock->CurrentNtpInMilliseconds();
EXPECT_GT(milliseconds_lower_bound / 1000, kNtpJan1970);
- EXPECT_LE(milliseconds_lower_bound - 1, Clock::NtpToMs(seconds, fractions));
- EXPECT_GE(milliseconds_upper_bound + 1, Clock::NtpToMs(seconds, fractions));
+ EXPECT_LE(milliseconds_lower_bound - 1, ntp_time.ToMs());
+ EXPECT_GE(milliseconds_upper_bound + 1, ntp_time.ToMs());
}
} // namespace webrtc
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698