aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorSebastian Jansson <srte@webrtc.org>2018-05-08 14:52:22 +0200
committerCommit Bot <commit-bot@chromium.org>2018-05-08 13:22:53 +0000
commit5f83cf0c6d842352d8e017321f0223aefebb1bef (patch)
tree3a82358adf0e282e0c0de4c58ab85c22a0d1409e /audio
parent5b2b692079e65be33998e6b8e7e7b7efce3cf9bf (diff)
downloadwebrtc-5f83cf0c6d842352d8e017321f0223aefebb1bef.tar.gz
Replacing rtc::TimeDelta with webrtc::TimeDelta.
This removes the redundant type and replaces all usages. A slight change in behavior is that we no longer get nanosecond resolution. This should not matter since no current code requires nanosecond resolution. Bug: webrtc:9155 Change-Id: I04334e08c686d95731621a6c8a7e40400d0ae3b2 Reviewed-on: https://webrtc-review.googlesource.com/71163 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23174}
Diffstat (limited to 'audio')
-rw-r--r--audio/BUILD.gn1
-rw-r--r--audio/audio_send_stream_unittest.cc5
-rw-r--r--audio/time_interval_unittest.cc4
3 files changed, 5 insertions, 5 deletions
diff --git a/audio/BUILD.gn b/audio/BUILD.gn
index 8981dd3353..75a62c2f75 100644
--- a/audio/BUILD.gn
+++ b/audio/BUILD.gn
@@ -128,6 +128,7 @@ if (rtc_include_tests) {
":audio_end_to_end_test",
"../api:mock_audio_mixer",
"../api/audio:audio_frame_api",
+ "../api/units:time_delta",
"../call:mock_call_interfaces",
"../call:mock_rtp_interfaces",
"../call:rtp_interfaces",
diff --git a/audio/audio_send_stream_unittest.cc b/audio/audio_send_stream_unittest.cc
index 8fb7e7e197..d39912000c 100644
--- a/audio/audio_send_stream_unittest.cc
+++ b/audio/audio_send_stream_unittest.cc
@@ -12,6 +12,7 @@
#include <utility>
#include <vector>
+#include "api/units/time_delta.h"
#include "audio/audio_send_stream.h"
#include "audio/audio_state.h"
#include "audio/conversion.h"
@@ -28,7 +29,6 @@
#include "rtc_base/fakeclock.h"
#include "rtc_base/ptr_util.h"
#include "rtc_base/task_queue.h"
-#include "rtc_base/timedelta.h"
#include "test/gtest.h"
#include "test/mock_audio_encoder.h"
#include "test/mock_audio_encoder_factory.h"
@@ -545,8 +545,7 @@ TEST(AudioSendStreamTest, UpdateLifetime) {
EXPECT_CALL(mock_transport, SendRtp(_, _, _)).Times(2);
const PacketOptions options;
registered_transport->SendRtp(nullptr, 0, options);
- fake_clock.AdvanceTime(
- rtc::TimeDelta::FromMilliseconds(kTimeBetweenSendRtpCallsMs));
+ fake_clock.AdvanceTime(TimeDelta::ms(kTimeBetweenSendRtpCallsMs));
registered_transport->SendRtp(nullptr, 0, options);
}
EXPECT_TRUE(!helper.active_lifetime()->Empty());
diff --git a/audio/time_interval_unittest.cc b/audio/time_interval_unittest.cc
index 7f8b44ecec..deff6e363d 100644
--- a/audio/time_interval_unittest.cc
+++ b/audio/time_interval_unittest.cc
@@ -9,8 +9,8 @@
*/
#include "audio/time_interval.h"
+#include "api/units/time_delta.h"
#include "rtc_base/fakeclock.h"
-#include "rtc_base/timedelta.h"
#include "test/gtest.h"
namespace webrtc {
@@ -19,7 +19,7 @@ TEST(TimeIntervalTest, TimeInMs) {
rtc::ScopedFakeClock fake_clock;
TimeInterval interval;
interval.Extend();
- fake_clock.AdvanceTime(rtc::TimeDelta::FromMilliseconds(100));
+ fake_clock.AdvanceTime(TimeDelta::ms(100));
interval.Extend();
EXPECT_EQ(interval.Length(), 100);
}