Cleanup nanosleep -> SleepMs

Remove some leftover stuff

BUG=603
TEST=

Review URL: https://webrtc-codereview.appspot.com/672005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3700 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
hta@webrtc.org 2013-03-21 14:02:29 +00:00
parent ae4e2b352b
commit 2cec0b1670
2 changed files with 2 additions and 13 deletions

View File

@ -10,14 +10,6 @@
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#ifdef _WIN32
// For Sleep()
#include <windows.h>
#else
// For nanosleep()
#include <time.h>
#endif
#include "gtest/gtest.h"
#include "webrtc/system_wrappers/interface/sleep.h"
#include "webrtc/system_wrappers/interface/thread_wrapper.h"

View File

@ -49,7 +49,6 @@
#include <assert.h>
#include <errno.h>
#include <string.h> // strncpy
#include <time.h> // nanosleep
#include <unistd.h>
#ifdef WEBRTC_LINUX
#include <sys/types.h>
@ -61,6 +60,7 @@
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/event_wrapper.h"
#include "webrtc/system_wrappers/interface/sleep.h"
#include "webrtc/system_wrappers/interface/trace.h"
namespace webrtc {
@ -292,10 +292,7 @@ bool ThreadPosix::Stop() {
// TODO(hellner) why not use an event here?
// Wait up to 10 seconds for the thread to terminate
for (int i = 0; i < 1000 && !dead; ++i) {
timespec t;
t.tv_sec = 0;
t.tv_nsec = 10 * 1000 * 1000;
nanosleep(&t, NULL);
SleepMs(10);
{
CriticalSectionScoped cs(crit_state_);
dead = dead_;