From e3ecf83bfbb7151eef51213f9c594e403291ede5 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sun, 15 Apr 2018 04:02:42 +0000 Subject: [PATCH] Explicitly use long with boost::posix_time --- lib/base/timer.cpp | 2 +- lib/checker/checkercomponent.cpp | 2 +- lib/remote/eventqueue.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/base/timer.cpp b/lib/base/timer.cpp index 293003852..4f0f0f35c 100644 --- a/lib/base/timer.cpp +++ b/lib/base/timer.cpp @@ -266,7 +266,7 @@ void Timer::TimerThreadProc(void) 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 65098d6c3..f43648c43 100644 --- a/lib/checker/checkercomponent.cpp +++ b/lib/checker/checkercomponent.cpp @@ -130,7 +130,7 @@ void CheckerComponent::CheckThreadProc(void) 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 77c1eec0f..c54b91716 100644 --- a/lib/remote/eventqueue.cpp +++ b/lib/remote/eventqueue.cpp @@ -114,7 +114,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 Dictionary::Ptr(); } } -- 2.40.0