Read recv timestamps from socket (posix only).
This helps a lot on Android devices where the user threads can be scheduled with low priority when the app is in the background, causing spurious significantly delayed before a packet can be read from the socket. With this patch the timestamp is taken by the kernel when the packet actually arrives.
R=juberti@chromium.org
TBR=juberti@webrtc.org
BUG=webrtc:5773
Review URL: https://codereview.webrtc.org/1944683002 .
Cr-Commit-Position: refs/heads/master@{#12850}
diff --git a/webrtc/base/socket_unittest.h b/webrtc/base/socket_unittest.h
index adc69f1..41f0a65 100644
--- a/webrtc/base/socket_unittest.h
+++ b/webrtc/base/socket_unittest.h
@@ -57,6 +57,7 @@
void TestUdpReadyToSendIPv6();
void TestGetSetOptionsIPv4();
void TestGetSetOptionsIPv6();
+ void TestSocketRecvTimestamp();
static const int kTimeout = 5000; // ms
const IPAddress kIPv4Loopback;
@@ -84,6 +85,7 @@
void UdpInternal(const IPAddress& loopback);
void UdpReadyToSend(const IPAddress& loopback);
void GetSetOptionsInternal(const IPAddress& loopback);
+ void SocketRecvTimestamp(const IPAddress& loopback);
SocketServer* ss_;
};