diff --git a/lib/base/timer.cpp b/lib/base/timer.cpp index d862f8088..0eb03f754 100644 --- a/lib/base/timer.cpp +++ b/lib/base/timer.cpp @@ -292,7 +292,7 @@ void Timer::TimerThreadProc() if (wait > 0.01) { /* Wait for the next timer. */ - l_TimerCV.timed_wait(lock, boost::posix_time::milliseconds(wait * 1000)); + l_TimerCV.timed_wait(lock, boost::posix_time::milliseconds(long(wait * 1000))); continue; } diff --git a/lib/checker/checkercomponent.cpp b/lib/checker/checkercomponent.cpp index 12e43b73c..c26db9de1 100644 --- a/lib/checker/checkercomponent.cpp +++ b/lib/checker/checkercomponent.cpp @@ -125,7 +125,7 @@ void CheckerComponent::CheckThreadProc() if (wait > 0) { /* Wait for the next check. */ - m_CV.timed_wait(lock, boost::posix_time::milliseconds(wait * 1000)); + m_CV.timed_wait(lock, boost::posix_time::milliseconds(long(wait * 1000))); continue; } diff --git a/lib/remote/eventqueue.cpp b/lib/remote/eventqueue.cpp index 756c9b9a8..5f3b01a2f 100644 --- a/lib/remote/eventqueue.cpp +++ b/lib/remote/eventqueue.cpp @@ -108,7 +108,7 @@ Dictionary::Ptr EventQueue::WaitForEvent(void *client, double timeout) return result; } - if (!m_CV.timed_wait(lock, boost::posix_time::milliseconds(timeout * 1000))) + if (!m_CV.timed_wait(lock, boost::posix_time::milliseconds(long(timeout * 1000)))) return nullptr; } }