]> granicus.if.org Git - icinga2/commitdiff
Explicitly use long with boost::posix_time
authorJan Beich <jbeich@FreeBSD.org>
Sun, 15 Apr 2018 04:02:42 +0000 (04:02 +0000)
committerJean Flach <jean-marcel.flach@icinga.com>
Mon, 16 Apr 2018 13:39:57 +0000 (15:39 +0200)
lib/base/timer.cpp
lib/checker/checkercomponent.cpp
lib/remote/eventqueue.cpp

index 293003852029c293228d4b16b2b1a5683e0302f6..4f0f0f35cf031074b53b70ffdbb4d17eb6d09ba2 100644 (file)
@@ -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;
                }
index 65098d6c36b6ca22b2c790df4098148352a249c3..f43648c43aafa789b8908abc795c6fb1eeb7c3d1 100644 (file)
@@ -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;
                }
index 77c1eec0ff11503d241c2379b3b55b80491f7c55..c54b91716cad8aa0842861aa85898f81f0836673 100644 (file)
@@ -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();
        }
 }