diff --git a/webrtc/modules/udp_transport/source/udp_socket2_windows.cc b/webrtc/modules/udp_transport/source/udp_socket2_windows.cc index 2362cdd01..d6bc32e1b 100644 --- a/webrtc/modules/udp_transport/source/udp_socket2_windows.cc +++ b/webrtc/modules/udp_transport/source/udp_socket2_windows.cc @@ -8,14 +8,15 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "udp_socket2_windows.h" +#include "modules/udp_transport/source/udp_socket2_windows.h" #include #include #include -#include "traffic_control_windows.h" -#include "udp_socket2_manager_windows.h" +#include "modules/udp_transport/source/traffic_control_windows.h" +#include "modules/udp_transport/source/udp_socket2_manager_windows.h" +#include "system_wrappers/interface/sleep.h" #pragma warning(disable : 4311) @@ -627,7 +628,7 @@ WebRtc_Word32 UdpSocket2Windows::PostRecv(PerIoContext* pIoContext) tries); // Tell the OS that this is a good place to context switch if // it wants to. - Sleep(0); + SleepMs(0); } } if((rxError == ERROR_IO_PENDING) || (nRet == 0)) diff --git a/webrtc/modules/udp_transport/source/udp_socket_manager_posix.cc b/webrtc/modules/udp_transport/source/udp_socket_manager_posix.cc index 889fb2fd4..1705aefcb 100644 --- a/webrtc/modules/udp_transport/source/udp_socket_manager_posix.cc +++ b/webrtc/modules/udp_transport/source/udp_socket_manager_posix.cc @@ -16,8 +16,9 @@ #include #include -#include "trace.h" -#include "udp_socket_posix.h" +#include "modules/udp_transport/source/udp_socket_posix.h" +#include "system_wrappers/interface/sleep.h" +#include "system_wrappers/interface/trace.h" namespace webrtc { UdpSocketManagerPosix::UdpSocketManagerPosix() @@ -286,19 +287,13 @@ bool UdpSocketManagerPosixImpl::Process() if (num == SOCKET_ERROR) { // Timeout = 10 ms. - timespec t; - t.tv_sec = 0; - t.tv_nsec = 10000*1000; - nanosleep(&t, NULL); + SleepMs(10); return true; } }else { // Timeout = 10 ms. - timespec t; - t.tv_sec = 0; - t.tv_nsec = 10000*1000; - nanosleep(&t, NULL); + SleepMs(10); return true; }