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

Side by Side Diff: webrtc/test/drifting_clock.h

Issue 2733823002: Replace Clock::CurrentNtp with Clock::CurrentNtpTime (Closed)
Patch Set: Remove CurrentNtp instead of deprecate Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « webrtc/system_wrappers/source/clock.cc ('k') | webrtc/test/drifting_clock.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #ifndef WEBRTC_TEST_DRIFTING_CLOCK_H_ 10 #ifndef WEBRTC_TEST_DRIFTING_CLOCK_H_
(...skipping 11 matching lines...) Expand all
22 static const float kHalfSpeed; // 0.5f; 22 static const float kHalfSpeed; // 0.5f;
23 23
24 DriftingClock(Clock* clock, float speed); 24 DriftingClock(Clock* clock, float speed);
25 25
26 // TODO(danilchap): Make this functions constexpr when it would be supported. 26 // TODO(danilchap): Make this functions constexpr when it would be supported.
27 static float PercentsFaster(float percent) { return 1.0f + percent / 100.0f; } 27 static float PercentsFaster(float percent) { return 1.0f + percent / 100.0f; }
28 static float PercentsSlower(float percent) { return 1.0f - percent / 100.0f; } 28 static float PercentsSlower(float percent) { return 1.0f - percent / 100.0f; }
29 29
30 int64_t TimeInMilliseconds() const override; 30 int64_t TimeInMilliseconds() const override;
31 int64_t TimeInMicroseconds() const override; 31 int64_t TimeInMicroseconds() const override;
32 void CurrentNtp(uint32_t& seconds, uint32_t& fractions) const override; 32 NtpTime CurrentNtpTime() const override;
33 int64_t CurrentNtpInMilliseconds() const override; 33 int64_t CurrentNtpInMilliseconds() const override;
34 34
35 private: 35 private:
36 float Drift() const; 36 float Drift() const;
37 37
38 Clock* const clock_; 38 Clock* const clock_;
39 const float drift_; 39 const float drift_;
40 const int64_t start_time_; 40 const int64_t start_time_;
41 }; 41 };
42 } // namespace test 42 } // namespace test
43 } // namespace webrtc 43 } // namespace webrtc
44 44
45 #endif // WEBRTC_TEST_DRIFTING_CLOCK_H_ 45 #endif // WEBRTC_TEST_DRIFTING_CLOCK_H_
OLDNEW
« no previous file with comments | « webrtc/system_wrappers/source/clock.cc ('k') | webrtc/test/drifting_clock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698