| Index: webrtc/test/drifting_clock.cc
|
| diff --git a/webrtc/test/drifting_clock.cc b/webrtc/test/drifting_clock.cc
|
| index 76f17235ceb9cdb0351dd368cc43f695da76a264..b11077641d7b915602b533f38e11beff4bee6e71 100644
|
| --- a/webrtc/test/drifting_clock.cc
|
| +++ b/webrtc/test/drifting_clock.cc
|
| @@ -39,15 +39,14 @@ int64_t DriftingClock::TimeInMicroseconds() const {
|
| return clock_->TimeInMicroseconds() + Drift();
|
| }
|
|
|
| -void DriftingClock::CurrentNtp(uint32_t& seconds, uint32_t& fractions) const {
|
| +NtpTime DriftingClock::CurrentNtpTime() const {
|
| // NTP precision is 1/2^32 seconds, i.e. 2^32 ntp fractions = 1 second.
|
| const double kNtpFracPerMicroSecond = 4294.967296; // = 2^32 / 10^6
|
|
|
| - clock_->CurrentNtp(seconds, fractions);
|
| - uint64_t total_fractions = (static_cast<uint64_t>(seconds) << 32) | fractions;
|
| + NtpTime ntp = clock_->CurrentNtpTime();
|
| + uint64_t total_fractions = static_cast<uint64_t>(ntp);
|
| total_fractions += Drift() * kNtpFracPerMicroSecond;
|
| - seconds = total_fractions >> 32;
|
| - fractions = static_cast<uint32_t>(total_fractions);
|
| + return NtpTime(total_fractions);
|
| }
|
|
|
| int64_t DriftingClock::CurrentNtpInMilliseconds() const {
|
|
|