diff options
Diffstat (limited to 'webrtc/system_wrappers/source/event_timer_posix.cc')
-rw-r--r-- | webrtc/system_wrappers/source/event_timer_posix.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/webrtc/system_wrappers/source/event_timer_posix.cc b/webrtc/system_wrappers/source/event_timer_posix.cc index 99eebcb70a..9f9a324bcb 100644 --- a/webrtc/system_wrappers/source/event_timer_posix.cc +++ b/webrtc/system_wrappers/source/event_timer_posix.cc @@ -154,14 +154,14 @@ bool EventTimerPosix::StartTimer(bool periodic, unsigned long time) { // Start the timer thread timer_event_.reset(new EventTimerPosix()); const char* thread_name = "WebRtc_event_timer_thread"; - timer_thread_ = ThreadWrapper::CreateThread(Run, this, thread_name); + timer_thread_.reset(new rtc::PlatformThread(Run, this, thread_name)); periodic_ = periodic; time_ = time; - bool started = timer_thread_->Start(); - timer_thread_->SetPriority(kRealtimePriority); + timer_thread_->Start(); + timer_thread_->SetPriority(rtc::kRealtimePriority); pthread_mutex_unlock(&mutex_); - return started; + return true; } bool EventTimerPosix::Run(void* obj) { @@ -215,9 +215,7 @@ bool EventTimerPosix::StopTimer() { timer_event_->Set(); } if (timer_thread_) { - if (!timer_thread_->Stop()) { - return false; - } + timer_thread_->Stop(); timer_thread_.reset(); } timer_event_.reset(); |