Two more sleep calls converted to use SleepMs().
This is CL 753005 in its new home. BUG=603 Review URL: https://webrtc-codereview.appspot.com/1201008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3761 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
		| @@ -14,6 +14,7 @@ | |||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| #include <winsock2.h> | #include <winsock2.h> | ||||||
|  |  | ||||||
|  | #include "webrtc/system_wrappers/interface/sleep.h" | ||||||
| #include "webrtc/test/channel_transport/traffic_control_win.h" | #include "webrtc/test/channel_transport/traffic_control_win.h" | ||||||
| #include "webrtc/test/channel_transport/udp_socket2_manager_win.h" | #include "webrtc/test/channel_transport/udp_socket2_manager_win.h" | ||||||
|  |  | ||||||
| @@ -629,7 +630,7 @@ WebRtc_Word32 UdpSocket2Windows::PostRecv(PerIoContext* pIoContext) | |||||||
|                     tries); |                     tries); | ||||||
|                 // Tell the OS that this is a good place to context switch if |                 // Tell the OS that this is a good place to context switch if | ||||||
|                 // it wants to. |                 // it wants to. | ||||||
|                 Sleep(0); |                 SleepMs(0); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         if((rxError == ERROR_IO_PENDING) || (nRet == 0)) |         if((rxError == ERROR_IO_PENDING) || (nRet == 0)) | ||||||
|   | |||||||
| @@ -17,6 +17,7 @@ | |||||||
| #include <unistd.h> | #include <unistd.h> | ||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
|  |  | ||||||
|  | #include "webrtc/system_wrappers/interface/sleep.h" | ||||||
| #include "webrtc/system_wrappers/interface/trace.h" | #include "webrtc/system_wrappers/interface/trace.h" | ||||||
| #include "webrtc/test/channel_transport/udp_socket_posix.h" | #include "webrtc/test/channel_transport/udp_socket_posix.h" | ||||||
|  |  | ||||||
| @@ -286,19 +287,13 @@ bool UdpSocketManagerPosixImpl::Process() | |||||||
|         if (num == SOCKET_ERROR) |         if (num == SOCKET_ERROR) | ||||||
|         { |         { | ||||||
|             // Timeout = 10 ms. |             // Timeout = 10 ms. | ||||||
|             timespec t; |             SleepMs(10); | ||||||
|             t.tv_sec = 0; |  | ||||||
|             t.tv_nsec = 10000*1000; |  | ||||||
|             nanosleep(&t, NULL); |  | ||||||
|             return true; |             return true; | ||||||
|         } |         } | ||||||
|     }else |     }else | ||||||
|     { |     { | ||||||
|         // Timeout = 10 ms. |         // Timeout = 10 ms. | ||||||
|         timespec t; |         SleepMs(10); | ||||||
|         t.tv_sec = 0; |  | ||||||
|         t.tv_nsec = 10000*1000; |  | ||||||
|         nanosleep(&t, NULL); |  | ||||||
|         return true; |         return true; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 hta@webrtc.org
					hta@webrtc.org